summaryrefslogtreecommitdiff
path: root/include/linux/suspend.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2013-06-12 12:55:22 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-21 00:35:12 +0200
commitbb177fedd348c92c2bea6adc9a2163ebff15272e (patch)
tree85a9ea53b0a15f56bbb0427adbdd85002b0a3265 /include/linux/suspend.h
parentd24c2a4f919d17bd1ae4f4010a38ab07ece99cf7 (diff)
PM / Sleep: Print last wakeup source on failed wakeup_count write
Commit a938da06 introduced a useful little log message to tell users/debuggers which wakeup source aborted a suspend. However, this message is only printed if the abort happens during the in-kernel suspend path (after writing /sys/power/state). The full specification of the /sys/power/wakeup_count facility allows user-space power managers to double-check if wakeups have already happened before it actually tries to suspend (e.g. while it was running user-space pre-suspend hooks), by writing the last known wakeup_count value to /sys/power/wakeup_count. This patch changes the sysfs handler for that node to also print said log message if that write fails, so that we can figure out the offending wakeup source for both kinds of suspend aborts. Signed-off-by: Julius Werner <jwerner@chromium.org> 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 d4e3f16d5e89..f73cabf59012 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -363,6 +363,7 @@ extern bool pm_wakeup_pending(void);
extern bool pm_get_wakeup_count(unsigned int *count, bool block);
extern bool pm_save_wakeup_count(unsigned int count);
extern void pm_wakep_autosleep_enabled(bool set);
+extern void pm_print_active_wakeup_sources(void);
static inline void lock_system_sleep(void)
{