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

Commit a8c22f87 authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy Committed by Ashay Jaiswal
Browse files

power: qpnp-smbcharger: enable OTG in overcurrent scenario conditionally



Currently, in OTG overcurrent conditions, OTG is disabled and
enabled in the reset sequence when the number of retries is less
than 5. There is a sleep time of 20 ms between the above sequence.

However, there is a chance that the USBID interrupt for OTG
removal is handled between the OTG disable and enable sequence.
Even though the USB driver notifies the charger to disable OTG,
it will get enabled again because it's already in the OTG reset
sequence for enabling OTG. Fix this race condition by checking
the presence of OTG before enabling it in the OTG reset sequence.

CRs-Fixed: 887852
Change-Id: I9a34f7f8e34edde69c81abc9930a4b36a8c9e66c
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent bed8ba95
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