diff options
author | Jon Hunter | 2015-11-20 11:51:00 +0100 |
---|---|---|
committer | Lee Jones | 2015-12-04 09:45:44 +0100 |
commit | 35deff7eb212b661b32177b6043f674fde6314d7 (patch) | |
tree | 8b709ed77eb347b1fb4b65b56ccd2759194e28b2 /lib/test-kstrtox.c | |
parent | mfd: wm8994: Ensure that the whole MFD is built into a single module (diff) | |
download | kernel-qcow2-linux-35deff7eb212b661b32177b6043f674fde6314d7.tar.gz kernel-qcow2-linux-35deff7eb212b661b32177b6043f674fde6314d7.tar.xz kernel-qcow2-linux-35deff7eb212b661b32177b6043f674fde6314d7.zip |
mfd: as3722: Handle interrupts on suspend
The as3722 device is registered as an irqchip and the as3722-rtc interrupt
is one of it's interrupt sources. When using the as3722-rtc as a wake-up
device from suspend, the following is seen:
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 161.119 msecs
PM: late suspend of devices complete after 1.048 msecs
PM: noirq suspend of devices complete after 0.756 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
CPU2: shutdown
CPU3: shutdown
Entering suspend state LP1
Enabling non-boot CPUs ...
CPU1 is up
CPU2 is up
CPU3 is up
PM: noirq resume of devices complete after 0.487 msecs
as3722 4-0040: Failed to read IRQ status: -16
as3722 4-0040: Failed to read IRQ status: -16
as3722 4-0040: Failed to read IRQ status: -16
as3722 4-0040: Failed to read IRQ status: -16
...
The reason why the as3722 interrupt status cannot be read is because the
as3722 interrupt is not masked during suspend and when the as3722-rtc
interrupt occurs, to wake-up the device, the interrupt is seen before the
i2c controller has been resumed in order to read the as3722 interrupt
status.
The as3722-rtc driver sets it's interrupt as a wake-up source during
suspend, which gets propagated to the parent as3722 interrupt. However,
the as3722-rtc driver cannot disable it's interrupt during suspend
otherwise we would never be woken up and so the as3722 must disable it's
interrupt instead.
Fix this by disabling the as3722 interrupt during suspend. To ensure that
a wake-up event from the as3722 is not missing, enable the as3722 interrupt
as a wake-up source before disabling the interrupt on entering suspend.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'lib/test-kstrtox.c')
0 files changed, 0 insertions, 0 deletions