Skip to content

Commit

Permalink
mfd: twl4030: Fix chained irq handling on resume from suspend
Browse files Browse the repository at this point in the history
The irqs are enabled one-by-one in pm core resume_noirq phase.
This leads to situation where the twl4030 primary interrupt
handler (PIH) is enabled before the chained secondary handlers
(SIH). As the PIH cannot clear the pending interrupt, and
SIHs have not been enabled yet, a flood of interrupts hangs
the device.

Fixed the issue by setting the SIH irqs with IRQF_EARLY_RESUME
flags, so they get enabled before the PIH.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
Acked-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Kalle Jokiniemi authored and Samuel Ortiz committed Nov 21, 2012
1 parent 46b9d13 commit 8b41669
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mfd/twl4030-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,8 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base)
irq = sih_mod + twl4030_irq_base;
irq_set_handler_data(irq, agent);
agent->irq_name = kasprintf(GFP_KERNEL, "twl4030_%s", sih->name);
status = request_threaded_irq(irq, NULL, handle_twl4030_sih, 0,
status = request_threaded_irq(irq, NULL, handle_twl4030_sih,
IRQF_EARLY_RESUME,
agent->irq_name ?: sih->name, NULL);

dev_info(dev, "%s (irq %d) chaining IRQs %d..%d\n", sih->name,
Expand Down

0 comments on commit 8b41669

Please sign in to comment.