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

Commit ad3c4743 authored by Ashay Jaiswal's avatar Ashay Jaiswal Committed by Guru Das Srinagesh
Browse files

power: smb5: update VCONN control for PMI632 based platform



PMI632 based platform does not support PD, thus keep VCONN
control(enable/disable) in hardware mode(charger hardware
will automatically turn-on VCONN for typeC cable with Ra
present on one of the CC line).

Change-Id: I064ec1dac368ee481229880b8909a15cc5dfaeaa
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent 782d28fe
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -1670,15 +1670,18 @@ static int smb5_configure_typec(struct smb_charger *chg)
	}
	chg->typec_try_mode |= EN_TRY_SNK_BIT;

	/* configure VCONN for software control */
	/* For PD capable targets configure VCONN for software control */
	if (!chg->pd_not_supported) {
		rc = smblib_masked_write(chg, TYPE_C_VCONN_CONTROL_REG,
				 VCONN_EN_SRC_BIT | VCONN_EN_VALUE_BIT,
				 VCONN_EN_SRC_BIT);
		if (rc < 0) {
			dev_err(chg->dev,
			"Couldn't configure VCONN for SW control rc=%d\n", rc);
				"Couldn't configure VCONN for SW control rc=%d\n",
				rc);
			return rc;
		}
	}

	/* Enable detection of unoriented debug accessory in source mode */
	rc = smblib_masked_write(chg, DEBUG_ACCESS_SRC_CFG_REG,