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

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

Merge "power: smb5: Enable Type-C DRP try.snk support"

parents 2db73c74 810169d1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1402,6 +1402,14 @@ static int smb5_configure_typec(struct smb_charger *chg)
		return rc;
	}

	rc = smblib_masked_write(chg, TYPE_C_MODE_CFG_REG,
				EN_TRY_SNK_BIT, EN_TRY_SNK_BIT);
	if (rc < 0) {
		dev_err(chg->dev,
			"Couldn't enable try.snk rc=%d\n", rc);
		return rc;
	}

	/* configure VCONN for software control */
	rc = smblib_masked_write(chg, TYPE_C_VCONN_CONTROL_REG,
				 VCONN_EN_SRC_BIT | VCONN_EN_VALUE_BIT,
+1 −0
Original line number Diff line number Diff line
@@ -284,6 +284,7 @@ enum {

#define TYPE_C_MODE_CFG_REG			(TYPEC_BASE + 0x44)
#define TYPEC_POWER_ROLE_CMD_MASK		GENMASK(2, 1)
#define EN_TRY_SNK_BIT				BIT(4)
#define EN_SRC_ONLY_BIT				BIT(2)
#define EN_SNK_ONLY_BIT				BIT(1)
#define TYPEC_DISABLE_CMD_BIT			BIT(0)