[PATCH] T2 RTC IRQ handler should only clear it's own IRQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shared interrupts shouldn't clear all pending interrupt.

Signed-off-by: Klaus Pedersen <klaus.k.pedersen@xxxxxxxxx>
---
 drivers/rtc/rtc-twl4030.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/rtc/rtc-twl4030.c b/drivers/rtc/rtc-twl4030.c
index 0b3f6a4..4e8bc5b 100644
--- a/drivers/rtc/rtc-twl4030.c
+++ b/drivers/rtc/rtc-twl4030.c
@@ -409,8 +409,7 @@ static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
 	if (!(rd_reg & PWR_RTC_INT_CLR))
 		goto out;
 
-	rd_reg |= PWR_RTC_INT_CLR;
-	res = twl4030_i2c_write_u8(TWL4030_MODULE_INT, rd_reg, REG_PWR_ISR1);
+	res = twl4030_i2c_write_u8(TWL4030_MODULE_INT, PWR_RTC_INT_CLR, REG_PWR_ISR1);
 	if (res)
 		goto out;
 
@@ -438,12 +437,7 @@ static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
 	 * RTC event generates 2 interrupts in a row.
 	 * (no errata document available)
 	 */
-	res = twl4030_i2c_read_u8(TWL4030_MODULE_INT, &rd_reg, REG_PWR_ISR1);
-	if (res)
-		goto out;
-
-	rd_reg |= PWR_RTC_INT_CLR;
-	res = twl4030_i2c_write_u8(TWL4030_MODULE_INT, rd_reg, REG_PWR_ISR1);
+	res = twl4030_i2c_write_u8(TWL4030_MODULE_INT, PWR_RTC_INT_CLR, REG_PWR_ISR1);
 	if (res)
 		goto out;
 
-- 
1.5.3.3

-
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux