diff options
author | Sundar Iyer <sundar.iyer@stericsson.com> | 2010-12-12 23:03:16 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@stericsson.com> | 2010-12-19 13:27:52 -0500 |
commit | bd77efd0cea80865d4cfcc1e4b62789c51a74b2d (patch) | |
tree | 913a59584997dc809d4616501e6ada10bdac210d /drivers/mfd/tc3589x.c | |
parent | 611b7590afa6e6c6b0942b1d3efef17fbb348ef5 (diff) |
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/tc3589x.c')
-rw-r--r-- | drivers/mfd/tc3589x.c | 8 |
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) | |||
142 | struct tc3589x *tc3589x = data; | 142 | struct tc3589x *tc3589x = data; |
143 | int status; | 143 | int status; |
144 | 144 | ||
145 | again: | ||
145 | status = tc3589x_reg_read(tc3589x, TC3589x_IRQST); | 146 | status = tc3589x_reg_read(tc3589x, TC3589x_IRQST); |
146 | if (status < 0) | 147 | if (status < 0) |
147 | return IRQ_NONE; | 148 | return IRQ_NONE; |
@@ -156,9 +157,12 @@ static irqreturn_t tc3589x_irq(int irq, void *data) | |||
156 | /* | 157 | /* |
157 | * A dummy read or write (to any register) appears to be necessary to | 158 | * A dummy read or write (to any register) appears to be necessary to |
158 | * have the last interrupt clear (for example, GPIO IC write) take | 159 | * have the last interrupt clear (for example, GPIO IC write) take |
159 | * effect. | 160 | * effect. In such a case, recheck for any interrupt which is still |
161 | * pending. | ||
160 | */ | 162 | */ |
161 | tc3589x_reg_read(tc3589x, TC3589x_IRQST); | 163 | status = tc3589x_reg_read(tc3589x, TC3589x_IRQST); |
164 | if (status) | ||
165 | goto again; | ||
162 | 166 | ||
163 | return IRQ_HANDLED; | 167 | return IRQ_HANDLED; |
164 | } | 168 | } |