Skip to content
Snippets Groups Projects
Commit 024f5d14 authored by Ruchi Kandoi's avatar Ruchi Kandoi
Browse files

suspend: Return error when pending wakeup source is found.


If a wakeup source is found to be pending in the last stage of suspend
after syscore suspend then the device doesn't suspend but the error is
not propogated which causes an error in the accounting for the number
of suspend aborts and successful suspends.

Bug: 18179405
Change-Id: Ib63b4ead755127eaf03e3b303aab3c782ad02ed1
Signed-off-by: default avatarRuchi Kandoi <kandoiruchi@google.com>
parent 32351f7d
No related branches found
No related tags found
No related merge requests found
......@@ -234,10 +234,11 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
if (!(suspend_test(TEST_CORE) || *wakeup)) {
error = suspend_ops->enter(state);
events_check_enabled = false;
} else {
} else if (*wakeup) {
pm_get_active_wakeup_sources(suspend_abort,
MAX_SUSPEND_ABORT_LEN);
log_suspend_abort_reason(suspend_abort);
error = -EBUSY;
}
start_logging_wakeup_reasons();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment