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

Commit 937d1726 authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru
Browse files

usb: phy-msm-usb: Clear is_ext_chg_dcp flag on disconnect



On platforms that use SMB/PMI for charger detection, usb doesn't
exit LPM on DCP connect and marks is_ext_chg_dcp flag. This flag
is not cleared on disconnect if ID is GND which can happen with
special cables that support charging in host mode. If is_ext_chg_dcp
is set then on next SDP connection, driver ignores SDP and
treats that as DCP.

Fix this by clearing is_ext_chg_dcp flag during disconnect and allow
enumeration logic for SDP charger.

CRs-Fixed:1099336
Change-Id: I6dd6c40a2c123c787bb411acb432d8c6c3a4348e
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent 1e395c5c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3039,6 +3039,7 @@ static void msm_otg_set_vbus_state(int online)
		pr_debug("PMIC: BSV clear\n");
		msm_otg_dbg_log_event(&motg->phy, "PMIC: BSV CLEAR",
				init, motg->inputs);
		motg->is_ext_chg_dcp = false;
		if (!test_and_clear_bit(B_SESS_VLD, &motg->inputs) && init)
			return;
	}