USB: OTG: Fix fast plug out/in wall charger charging issue

PMIC Charging driver is depending on the PMIC VBUS interrupt for cable
disconnect event and depending on the USB driver for cable connect
interrupt. But, the VBUS thresholds are different for PMIC VBUS interrupt
(3.3V) and USB PHY VBUS interrupt (2.0V).

Due to this, during fast plug-out/in, on cable disconnection, before
VBUS voltage goes below 2.0V, if user plugs-in wall charger, then PHY may
miss to detect the VBUS disconnection, but PMIC detects as the threshold
is above 2.0V and marks as cable disconnection and PMIC charging driver
waits for USB driver for further cable connect. As PHY missed both cable
disconnect and connect events, USB driver never informs the cable connect
to PMIC charging driver.

Process the PMIC VBUS disconnect interrupt in USB driver and schedule the
state machine, which resets the PHY and detects the VBUS and notifies
PMIC charging driver about cable connect event.

Change-Id: Ic975934addb0c24eb054b89f3bf3e3870d9e7602
CRs-Fixed: 318839
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
1 file changed