Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b08f5884 authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Prevent sleep when state machine in progress



With PM autosleep enabled, the system may aggressively enter
and re-enter suspend in between calls to queue_work() and
when the state machine function gets executed, which may
at best result in numerous suspend/resume cycles and at
worse starve the PD state machine from even executing.

Fix this by calling pm_stay_awake() whenever the work is
queued and relinquish with pm_relax() when no further work
is to be done.

Change-Id: I71d8ea0c69a7b174c2280f92d1f5342e5e50d9b0
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 3bf9e384
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment