PM / core: Direct DPM_FLAG_LEAVE_SUSPENDED handling
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 10 Dec 2017 00:02:13 +0000 (01:02 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 2 Jan 2018 23:30:00 +0000 (00:30 +0100)
commit32bfa56ac158c1ebcc82df2518860f824be5e5be
treedc96e70410c19847ed630c97d7aab91779b0f4c0
parent75e94645fc3b1007eacb4c7863059f8e8d098cda
PM / core: Direct DPM_FLAG_LEAVE_SUSPENDED handling

Make the PM core handle DPM_FLAG_LEAVE_SUSPENDED directly for
devices whose "noirq", "late" and "early" driver callbacks are
invoked directly by it.

Namely, make it skip all of the system-wide resume callbacks for
such devices with DPM_FLAG_LEAVE_SUSPENDED set if they are in
runtime suspend during the "noirq" phase of system-wide suspend
(or analogous) transitions or the system transition under way is
a proper suspend (rather than anything related to hibernation) and
the device's wakeup settings are compatible with runtime PM (that
is, the device cannot generate wakeup signals at all or it is
allowed to wake up the system from sleep).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/driver-api/pm/devices.rst
drivers/base/power/main.c