USB: msm_otg: Add workaround for false detection of SDP
If charger detection is performed before data pins are contacted, DCP
(Dedicated Charging Port) will be incorrectly detected as SDP (Standard
Downstream Port). The current code waits 700 msec for data pins contact
to happen. But if USB plug is inserted very slowly, charger detection
happen before data pins get contacted.
This patch implements a workaround to the above problem. Kick a 2 sec
timer after SDP is detected. This timer would not do anything if USB
is in low power mode or cable is disconnected or gadget speed is assigned.
If above conditions are not not true, read line state. The line state
would be "11" in case of DCP as D+ is already pulled to high by gadget
driver. If DCP is detected, stop gadget driver and enter B_IDLE state.
PMIC is notified about available current and USB is put into low power
mode.
CRs-fixed: 405253
Change-Id: I9181a4774cd98308752ad6c281107ec11bc4728c
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment