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

Commit 86e581ce authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Xiaozhe Shi
Browse files

power: qpnp-smbcharger: fix usb type detection



Most of the platforms have D+/D- lines routed to USB PHY and the
charger. And almost all the PHYs pull down the D+/D- lines unless
it is set to active mode. This grounding causes issues with
source detection and results in detecting SDP even when it
is not.
Fix this by setting ALLOW_DETECTION property to inform the PHY to
remove the pull downs. Once done, rerun APSD and inform of the correct
results via the TYPE and PRESENT property. The reruns are necessary
only if an SDP is detected.

To rerun APSD use this following
procedure
1. Set the allowable USB voltage to 9V.
2. Sleep 40mS
3. Set the allowable USB voltage to 5V-9V.
Step 3 causes APSD to run again and raise the src_detect status.

Change-Id: I52a22901f16dea0144d9ed0444af32014d2f5612
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent d0953e5a
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