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

Commit 256cdfd1 authored by Chaojun Wang's avatar Chaojun Wang
Browse files

power: supply: doing otg when the flag is set to avoid otg error



Cause by qcs605 HW design restrictions, the voltage is 5v
on vbus when enable OTG function. so set a flag for QCS605
IPC to avoid the OTG error in "smblib_enable_otg_wa" function.

Change-Id: Ic6b98e7097e236eb90627bde706b4235ecc77e88
Signed-off-by: default avatarChaojun Wang <chaojun@codeaurora.org>
parent e5466df0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -217,6 +217,9 @@ static int smb2_parse_dt(struct smb2 *chip)
		return -EINVAL;
	}

	chg->reddragon_ipc_wa = of_property_read_bool(node,
				"qcom,qcs605-ipc-wa");

	chg->step_chg_enabled = of_property_read_bool(node,
				"qcom,step-charging-enable");

+1 −1
Original line number Diff line number Diff line
@@ -1606,7 +1606,7 @@ static int _smblib_vbus_regulator_enable(struct regulator_dev *rdev)

	smblib_dbg(chg, PR_OTG, "enabling OTG\n");

	if (chg->wa_flags & OTG_WA) {
	if ((chg->wa_flags & OTG_WA) && (!chg->reddragon_ipc_wa)) {
		rc = smblib_enable_otg_wa(chg);
		if (rc < 0)
			smblib_err(chg, "Couldn't enable OTG rc=%d\n", rc);
+1 −0
Original line number Diff line number Diff line
@@ -369,6 +369,7 @@ struct smb_charger {
	int			qc2_max_pulses;
	bool			non_compliant_chg_detected;
	bool			fake_usb_insertion;
	bool			reddragon_ipc_wa;

	/* extcon for VBUS / ID notification to USB for uUSB */
	struct extcon_dev	*extcon;