aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-06 18:49:34 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-13 20:17:33 -0400
commitef25ba0476015908ef5960f9faac149ddf34ede0 (patch)
tree00f955d56fc042f68954edaffd456dfe4ce26ad4 /kernel/power
parentc2df86ea924a8548f54ce90e46fdd6c9495119b2 (diff)
PM / sleep: Add flags to indicate platform firmware involvement
There are quite a few cases in which device drivers, bus types or even the PM core itself may benefit from knowing whether or not the platform firmware will be involved in the upcoming system power transition (during system suspend) or whether or not it was involved in it (during system resume). For this reason, introduce global system suspend flags that can be used by the platform code to expose that information for the benefit of the other parts of the kernel and make the ACPI core set them as appropriate. Users of the new flags will be added later. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/suspend.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 7e4cda4a8dd9..f9fe133c13e2 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -35,6 +35,9 @@
35const char *pm_labels[] = { "mem", "standby", "freeze", NULL }; 35const char *pm_labels[] = { "mem", "standby", "freeze", NULL };
36const char *pm_states[PM_SUSPEND_MAX]; 36const char *pm_states[PM_SUSPEND_MAX];
37 37
38unsigned int pm_suspend_global_flags;
39EXPORT_SYMBOL_GPL(pm_suspend_global_flags);
40
38static const struct platform_suspend_ops *suspend_ops; 41static const struct platform_suspend_ops *suspend_ops;
39static const struct platform_freeze_ops *freeze_ops; 42static const struct platform_freeze_ops *freeze_ops;
40static DECLARE_WAIT_QUEUE_HEAD(suspend_freeze_wait_head); 43static DECLARE_WAIT_QUEUE_HEAD(suspend_freeze_wait_head);
@@ -493,6 +496,7 @@ static int enter_state(suspend_state_t state)
493#endif 496#endif
494 497
495 pr_debug("PM: Preparing system for sleep (%s)\n", pm_states[state]); 498 pr_debug("PM: Preparing system for sleep (%s)\n", pm_states[state]);
499 pm_suspend_clear_flags();
496 error = suspend_prepare(state); 500 error = suspend_prepare(state);
497 if (error) 501 if (error)
498 goto Unlock; 502 goto Unlock;