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

Commit 2a0584b5 authored by Azhar Shaikh's avatar Azhar Shaikh
Browse files

usb: phy: qmp: Fix unbalanced regulator disable when charger connected



Currently, when a charger is connected, the LDO regulator is not enabled
during the controller resume path since it is not needed. Normally this is
followed by a controller suspend and the regulator_disable() is also
skipped. However, if the cable is unplugged immediately, the controller
will enter the suspend path with the charger status as disconnected, and
this will lead to an additional call to regulator_disable() on the LDO
which was not enabled. Hence this leads to an unbalanced regulator
disable.
The optimization is unnecessary and complicates the logic which leads
to this condition. Simplify it by removing the chg_connected check,
which allows the LDO regulator to enable on resume and disable upon
suspend.

CRs-fixed: 759976
Change-Id: I8b3d2718292ef886a7f331293fb2cd1a72d75396
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent 2172a6ec
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