summaryrefslogtreecommitdiff
path: root/include/linux/suspend.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-07-17 17:19:25 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-22 02:30:15 +0200
commitbd8c9ba3b1e2037af5af4e48aea1087212838179 (patch)
tree72917568ecaf4569ac95294d832b006ca1410824 /include/linux/suspend.h
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
PM / suspend: Export pm_suspend_target_state
Have the core suspend/resume framework store the system-wide suspend state (suspend_state_t) we are about to enter, and expose it to drivers via pm_suspend_target_state in order to retrieve that. The state is assigned in suspend_devices_and_enter(). This is useful for platform specific drivers that may need to take a slightly different suspend/resume path based on the system's suspend/resume state being entered. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/suspend.h')
-rw-r--r--include/linux/suspend.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 0b1cf32edfd7..2159f6841768 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -427,6 +427,7 @@ extern int unregister_pm_notifier(struct notifier_block *nb);
/* drivers/base/power/wakeup.c */
extern bool events_check_enabled;
extern unsigned int pm_wakeup_irq;
+extern suspend_state_t pm_suspend_target_state;
extern bool pm_wakeup_pending(void);
extern void pm_system_wakeup(void);