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

Commit 2f0cac89 authored by Zhenhua Huang's avatar Zhenhua Huang Committed by Abhijeet Dharmapurikar
Browse files

power: smb1351-charger: 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.

By the way, prevent running APSD when battery is missing. It prevents
brownout.

Change-Id: I472ee8b7fc9673910af206e37dd55b2d1a3fce5d
Signed-off-by: default avatarZhenhua Huang <zhenhuah@codeaurora.org>
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent a8ff857a
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