aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorSundar Iyer <sundar.iyer@stericsson.com>2010-12-13 09:33:16 +0530
committerLinus Walleij <linus.walleij@stericsson.com>2010-12-19 19:27:52 +0100
commitbd77efd0cea80865d4cfcc1e4b62789c51a74b2d (patch)
tree913a59584997dc809d4616501e6ada10bdac210d /drivers/mfd
parentmfd/tc3589x: add block identifier for multiple child devices (diff)
downloadlinux-dev-bd77efd0cea80865d4cfcc1e4b62789c51a74b2d.tar.xz
linux-dev-bd77efd0cea80865d4cfcc1e4b62789c51a74b2d.zip
mfd/tc3589x: fix random interrupt misses
On the TC35892, a random delayed interrupt clear (GPIO IC) write locks up the child interrupts. In such a case, the original interrupt is active and not yet acknowledged. Re-check the IRQST bit for any pending interrupts and handle those. Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/tc3589x.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c
index 0ed9669d95fa..708349a5c0e3 100644
--- a/drivers/mfd/tc3589x.c
+++ b/drivers/mfd/tc3589x.c
@@ -142,6 +142,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;
@@ -156,9 +157,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;
}