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

Commit d41f1b3a authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5: Enable HVDCP and BC 1.2 SRC detection for uUSB config"

parents 34e53ec4 871d432d
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1591,6 +1591,8 @@ static int smb5_configure_micro_usb(struct smb_charger *chg)
{
	int rc;

	chg->pd_not_supported = true;

	rc = smblib_masked_write(chg, TYPE_C_INTERRUPT_EN_CFG_2_REG,
					MICRO_USB_STATE_CHANGE_INT_EN_BIT,
					MICRO_USB_STATE_CHANGE_INT_EN_BIT);
@@ -1600,6 +1602,16 @@ static int smb5_configure_micro_usb(struct smb_charger *chg)
		return rc;
	}

	/* Enable HVDCP and BC 1.2 source detection */
	rc = smblib_masked_write(chg, USBIN_OPTIONS_1_CFG_REG,
					HVDCP_EN_BIT | BC1P2_SRC_DETECT_BIT,
					HVDCP_EN_BIT | BC1P2_SRC_DETECT_BIT);
	if (rc < 0) {
		dev_err(chg->dev,
			"Couldn't enable HVDCP detection rc=%d\n", rc);
		return rc;
	}

	return rc;
}