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

This commit is contained in:
qctecmdr Service 2018-05-31 14:54:00 -07:00 committed by Gerrit - the friendly Code Review server
commit d30a37bdf2
2 changed files with 9 additions and 0 deletions

View File

@ -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,

View File

@ -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)