mfd: Disable twl6030 IRQ during suspend
authorTodd Poynor <toddpoynor@google.com>
Mon, 26 Sep 2011 23:44:24 +0000 (16:44 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 24 Oct 2011 12:09:17 +0000 (14:09 +0200)
Module IRQs may still be disabled by DPM at the time the TWL6030
ISR runs, causing handle_simple_irq() to silently do nothing.
This may result in missing TWL RTC alarm wakeups, for example,
since the RTC child module ISR is not called to ack the IRQ.

Disable the TWL6030 IRQ during suspend, enable it at DPM resume
time, at which time the child module IRQs will be re-enabled.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/twl6030-irq.c

index a014ec4..deec3ec 100644 (file)
@@ -109,7 +109,13 @@ static int twl6030_irq_pm_notifier(struct notifier_block *notifier,
                        twl_irq_wake_enabled = false;
                }
 
+               disable_irq(twl_irq);
                break;
+
+       case PM_POST_SUSPEND:
+               enable_irq(twl_irq);
+               break;
+
        default:
                break;
        }