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

Commit ede6277d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qcom: smb-lib: disable VCONN operations for micro USB mode"

parents 48912ce0 7174c176
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1133,6 +1133,9 @@ static int smb2_init_vconn_regulator(struct smb2 *chip)
	struct regulator_config cfg = {};
	int rc = 0;

	if (chg->micro_usb_mode)
		return 0;

	chg->vconn_vreg = devm_kzalloc(chg->dev, sizeof(*chg->vconn_vreg),
				      GFP_KERNEL);
	if (!chg->vconn_vreg)
@@ -1344,9 +1347,10 @@ static int smb2_disable_typec(struct smb_charger *chg)
	int rc;

	/* Move to typeC mode */
	/* configure FSM in idle state */
	/* configure FSM in idle state and disable UFP_ENABLE bit */
	rc = smblib_masked_write(chg, TYPE_C_INTRPT_ENB_SOFTWARE_CTRL_REG,
			TYPEC_DISABLE_CMD_BIT, TYPEC_DISABLE_CMD_BIT);
			TYPEC_DISABLE_CMD_BIT | UFP_EN_CMD_BIT,
			TYPEC_DISABLE_CMD_BIT);
	if (rc < 0) {
		dev_err(chg->dev, "Couldn't put FSM in idle rc=%d\n", rc);
		return rc;
+3 −0
Original line number Diff line number Diff line
@@ -4117,6 +4117,9 @@ static void smblib_vconn_oc_work(struct work_struct *work)
	int rc, i;
	u8 stat;

	if (chg->micro_usb_mode)
		return;

	smblib_err(chg, "over-current detected on VCONN\n");
	if (!chg->vconn_vreg || !chg->vconn_vreg->rdev)
		return;