]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/rtc/rtc-twl4030.c
rtc-twl4030: Fix periodic interrupt
[linux-2.6-omap-h63xx.git] / drivers / rtc / rtc-twl4030.c
index 98324365a919bc815945a32285de91dd59303a27..98aea0788b7c9e19a70094a87f40c458cd15a1da 100644 (file)
@@ -322,8 +322,13 @@ static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
                                   REG_RTC_STATUS_REG);
        if (res)
                goto out;
-       res = twl4030_i2c_write_u8(TWL4030_MODULE_INT,
-                       PWR_RTC_INT_CLR, REG_PWR_ISR1);
+
+       /* Clear on Read enabled. RTC_IT bit of REG_PWR_ISR1 needs
+        * 2 reads to clear the interrupt. One read is done in
+        * do_twl4030_pwrirq(). Doing the second read, to clear
+        * the bit.
+        */
+       res = twl4030_i2c_read_u8(TWL4030_MODULE_INT, &rd_reg, REG_PWR_ISR1);
        if (res)
                goto out;