PM / Domains: Wakeup devices support for system sleep transitions
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 1 Jul 2011 20:13:29 +0000 (22:13 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sat, 2 Jul 2011 12:29:56 +0000 (14:29 +0200)
commitd4f2d87a8b46c14c4307c690c92bd08229f66ecf
tree6560c88f024f9972936cfd4dabc1685e00baee8b
parent596ba34bcd2978ee9823cc1d84df230576f8ffb9
PM / Domains: Wakeup devices support for system sleep transitions

There is the problem how to handle devices set up to wake up the
system from sleep states during system-wide power transitions.
In some cases, those devices can be turned off entirely, because the
wakeup signals will be generated on their behalf anyway.  In some
other cases, they will generate wakeup signals if their clocks are
stopped, but only if power is not removed from them.  Finally, in
some cases, they can only generate wakeup signals if power is not
removed from them and their clocks are enabled.

To allow platform-specific code to decide whether or not to put
wakeup devices (and their PM domains) into low-power state during
system-wide transitions, such as system suspend, introduce a new
generic PM domain callback, .active_wakeup(), that will be used
during the "noirq" phase of system suspend and hibernation (after
image creation) to decide what to do with wakeup devices.
Specifically, if this callback is present and returns "true", the
generic PM domain code will not execute .stop_device() for the
given wakeup device and its PM domain won't be powered off.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Kevin Hilman <khilman@ti.com>
drivers/base/power/domain.c
include/linux/pm_domain.h