Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
power: catch wake-up requests in suspend_again
It is possible during the processing of suspend_again() that a wake-up request (i.e. pm_stay_awake()) be made by a driver in response to an outside event (i.e. hw interrupt, etc.). Currently, when suspend_again() requests to re-enter suspend, suspend_enter() runs to re-enter suspend. The pm_wakeup_pending() function is called to check for any wake-up requests. However, this function is essentially disabled because the events_check_enabled flag is set to false by the previous run through suspend_enter(). This causes any wake-up request made during the processing of suspend_again() to be delayed until the next time the kernel resumes sometime in the future. To resolve this issue, if suspend_again() votes to re-enter suspend_enter() the count of wake-up requests is re-evaluated and the events_check_enabled flag set correctly based on the presence of wake-up requests that occurred during suspend_again(). Signed-off-by: Joe Swantek <jswantek@motorola.com> Reviewed-by: Patrick Auchter <auchter@motorola.com> Reviewed-by: Christopher Fries <cfries@motorola.com> SLTApproved: Christopher Fries <cfries@motorola.com> Reviewed-by: Ravi Chebolu <arc095@motorola.com> Reviewed-by: Fred Fettinger <fettinge@motorola.com> Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com> Reviewed-by: Russell Knize <rknize@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com>
- Loading branch information