Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5285f853 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Stephen Boyd
Browse files

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: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 781da9dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment