summaryrefslogtreecommitdiff
path: root/kernel/power/process.c
diff options
context:
space:
mode:
authorRuchi Kandoi <kandoiruchi@google.com>2014-10-29 10:36:27 -0700
committerJohn Stultz <john.stultz@linaro.org>2016-02-16 13:53:38 -0800
commit57caa2ad5ce35bedb7ab374a2e5b4d7adf63da2b (patch)
tree960197e19ff7a3e40d0380935da2cec972155dfe /kernel/power/process.c
parent1adb5b403433616585cae7fa22a61ede2400319a (diff)
power: Adds functionality to log the last suspend abort reason.
Extends the last_resume_reason to log suspend abort reason. The abort reasons will have "Abort:" appended at the start to distinguish itself from the resume reason. Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com> Change-Id: I3207f1844e3d87c706dfc298fb10e1c648814c5f
Diffstat (limited to 'kernel/power/process.c')
-rw-r--r--kernel/power/process.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/power/process.c b/kernel/power/process.c
index fa50018418dc..37eac4066e71 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -18,6 +18,7 @@
#include <linux/workqueue.h>
#include <linux/kmod.h>
#include <trace/events/power.h>
+#include <linux/wakeup_reason.h>
/*
* Timeout for stopping processes
@@ -35,6 +36,7 @@ static int try_to_freeze_tasks(bool user_only)
unsigned int elapsed_msecs;
bool wakeup = false;
int sleep_usecs = USEC_PER_MSEC;
+ char suspend_abort[MAX_SUSPEND_ABORT_LEN];
do_gettimeofday(&start);
@@ -64,6 +66,9 @@ static int try_to_freeze_tasks(bool user_only)
break;
if (pm_wakeup_pending()) {
+ pm_get_active_wakeup_sources(suspend_abort,
+ MAX_SUSPEND_ABORT_LEN);
+ log_suspend_abort_reason(suspend_abort);
wakeup = true;
break;
}