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:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment