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

Commit d5022b69 authored by Ashay Jaiswal's avatar Ashay Jaiswal
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>
parent 3f14fc90
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -1491,15 +1491,19 @@ static int smb5_configure_typec(struct smb_charger *chg)
		return rc;
	}

	/* Keep VCONN in h/w controlled mode for PMI632 */
	if (chg->smb_version != PMI632_SUBTYPE) {
		/* configure VCONN for software control */
		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;
		}
	}

	return rc;
}