Skip to content

Commit

Permalink
mfd/tc3589x: fix random interrupt misses
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sundar Iyer authored and Linus Walleij committed Dec 19, 2010
1 parent 611b759 commit bd77efd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/mfd/tc3589x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit bd77efd

Please sign in to comment.