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

Commit 8a53f7d7 authored by Nicholas Troast's avatar Nicholas Troast Committed by Kyle Yan
Browse files

qcom-charger: qpnp-smb2: disable Type-C factory mode



Type-C factory mode is unreliable and causes the Type-C mode to be
incorrectly detected in some cases. Disable it.

CRs-Fixed: 1019313
Change-Id: I5f66be80899c33816c886df526db9e50d7e9aff9
Signed-off-by: default avatarNicholas Troast <ntroast@codeaurora.org>
parent 5c0174be
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -530,6 +530,15 @@ static int smb2_init_hw(struct smb2 *chip)
		return rc;
	}

	/* disable Type-C factory mode */
	rc = smblib_masked_write(chg, TYPE_C_CFG_REG,
				 FACTORY_MODE_DETECTION_EN_BIT, 0);
	if (rc < 0) {
		dev_err(chg->dev,
			"Couldn't disable Type-C factory mode rc=%d\n", rc);
		return rc;
	}

	return rc;
}