power: qpnp-smbcharger: allow OTG OC retries after a delay
When a high capacitance OTG device is connected, the PMI8994 charger
will detect an overcurrent (OC) condition because of the inrush current.
The workaround for this is to retry the OTG enable once after getting an
OC condition. However, this does not account for the case where an OTG
dongle is kept connected to the device so that the PMI8994 charger will
continuously supply 5V. In this case, if the high capacitance device is
repeatedly connected and disconnected, the OC condition will arise every
time it is connected to the OTG device. Since the driver only retries
the OTG enable once, every subsequent OTG device insertion will fail.
Fix this by allowing the OTG to reset if an OC condition is not detected
within a certain time period.
CRs-Fixed: 757987
Change-Id: If4fd7edab97c0992c762717888377daa8d920605
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment