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

Skip to content
Commit 3ad23061 authored by Saket Saurabh's avatar Saket Saurabh
Browse files

phy-msm-usb: Set pm_done to true only when usb is in lpm



As part of USB disconnect event, msm_otg_suspend() executes and USB
enters into low power mode and pm_done flag is set to true. In the
scenario in which before the msm_otg_suspend() finished executing,
then USB connect event came in, in this case msm_otg_suspend() returns
-EBUSY. And later USB connect event is processed. As device is already
in resumed state, hence pm_done flag is never set to false. So on
next USB connect pm usage counter gets incremented in msm_otg_sm_work()
and device cannot enter into sleep state.

Fix the issue by setting pm_done flag to true as part of USB disconnect
event only when USB finished executing msm_otg_suspend() and is able to
enter low power mode.

CRs-fixed: 649434
Change-Id: Icd8d612ce6280300d0d97656f3dcf1921b45126f
Signed-off-by: default avatarSaket Saurabh <ssaurabh@codeaurora.org>
parent 9946a704
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