diff mbox

[11/20] mfd/tc3589x: fix random interrupt misses

Message ID 1291388753-14662-12-git-send-email-sundar.iyer@stericsson.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sundar Iyer Dec. 3, 2010, 3:05 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index 5672d56..e173f33 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -158,6 +158,7 @@  static irqreturn_t tc3589x_irq(int irq, void *data)
 	struct tc3589x *tc3589x = data;
 	int status;
 
+again:
 	status = tc3589x_reg_read(tc3589x, TC3589x_IRQST);
 	if (status < 0)
 		return IRQ_NONE;
@@ -172,9 +173,12 @@  static irqreturn_t tc3589x_irq(int irq, void *data)
 	/*
 	 * A dummy read or write (to any register) appears to be necessary to
 	 * have the last interrupt clear (for example, GPIO IC write) take
-	 * effect.
+	 * effect. In such a case, recheck for any interrupt which is still
+	 * pending.
 	 */
-	tc3589x_reg_read(tc3589x, TC3589x_IRQST);
+	status = tc3589x_reg_read(tc3589x, TC3589x_IRQST);
+	if (status)
+		goto again;
 
 	return IRQ_HANDLED;
 }