power: qpnp-smbcharger: correctly detect OTG devices
In PMI8994, USB devices may be incorrectly detected as a factory test
USB/UART cable. When this happens, the charger driver will treat the
cable as an OTG devive because the USB_RID status in the charger
peripheral is set to 0x00 (ground).
This can cause reverse boosting and failure for USB devices to
enumerate. Fix this by also checking the IDEV_STS to make sure the USB
device is not a factory test USB/UART device and that the ADC code is
close to ground before enabling OTG if the USBID is reported as ground.
Change-Id: I0903f2c20f378af086984082d40a2793460b9ff5
Signed-off-by:
Xiaozhe Shi <xiaozhes@codeaurora.org>
Loading
Please register or sign in to comment