diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-17 11:23:24 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-17 11:23:24 +0200 |
| commit | a954e5fb4bc2d401b8fc3b4c7cd316497ff80225 (patch) | |
| tree | 06af23b232c7c2e795a2fef8a5a0604ec64d5092 /include/linux/suspend.h | |
| parent | e137d34f94ebcb6508d7c8614ac045583fffbe2a (diff) | |
| parent | 9e0babf2c06c73cda2c0cd37a1653d823adb40ec (diff) | |
Merge 5.2-rc5 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/suspend.h')
| -rw-r--r-- | include/linux/suspend.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 4a2ffd678887..8594001e8be8 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -227,11 +227,42 @@ static inline void pm_set_resume_via_firmware(void) pm_suspend_global_flags |= PM_SUSPEND_FLAG_FW_RESUME; } +/** + * pm_suspend_via_firmware - Check if platform firmware will suspend the system. + * + * To be called during system-wide power management transitions to sleep states + * or during the subsequent system-wide transitions back to the working state. + * + * Return 'true' if the platform firmware is going to be invoked at the end of + * the system-wide power management transition (to a sleep state) in progress in + * order to complete it, or if the platform firmware has been invoked in order + * to complete the last (or preceding) transition of the system to a sleep + * state. + * + * This matters if the caller needs or wants to carry out some special actions + * depending on whether or not control will be passed to the platform firmware + * subsequently (for example, the device may need to be reset before letting the + * platform firmware manipulate it, which is not necessary when the platform + * firmware is not going to be invoked) or when such special actions may have + * been carried out during the preceding transition of the system to a sleep + * state (as they may need to be taken into account). + */ static inline bool pm_suspend_via_firmware(void) { return !!(pm_suspend_global_flags & PM_SUSPEND_FLAG_FW_SUSPEND); } +/** + * pm_resume_via_firmware - Check if platform firmware has woken up the system. + * + * To be called during system-wide power management transitions from sleep + * states. + * + * Return 'true' if the platform firmware has passed control to the kernel at + * the beginning of the system-wide power management transition in progress, so + * the event that woke up the system from sleep has been handled by the platform + * firmware. + */ static inline bool pm_resume_via_firmware(void) { return !!(pm_suspend_global_flags & PM_SUSPEND_FLAG_FW_RESUME); |
