diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-10-20 16:49:18 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-10-20 16:49:18 -0700 |
| commit | 9cf08e811ed396b96327e965d6481033fb2cda67 (patch) | |
| tree | 3f865619e6d6e07661d9ef582618c8c564159271 | |
| parent | bd398385b36590ae41649625f39f1291d2b0fa1d (diff) | |
| parent | 50f363d768bfd9f2a9e10f1601f3e80e7b4ac972 (diff) | |
Merge "power: qpnp_smb2: configure to extend DRP.DFP time in try.SNK"
| -rw-r--r-- | drivers/power/supply/qcom/qpnp-smb2.c | 12 | ||||
| -rw-r--r-- | drivers/power/supply/qcom/smb-reg.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/power/supply/qcom/qpnp-smb2.c b/drivers/power/supply/qcom/qpnp-smb2.c index 33f59bcfb781..4beaddff47b3 100644 --- a/drivers/power/supply/qcom/qpnp-smb2.c +++ b/drivers/power/supply/qcom/qpnp-smb2.c @@ -1663,6 +1663,18 @@ static int smb2_init_hw(struct smb2 *chip) return rc; } + /* + * allow DRP.DFP time to exceed by tPDdebounce time. + */ + rc = smblib_masked_write(chg, TAPER_TIMER_SEL_CFG_REG, + TYPEC_DRP_DFP_TIME_CFG_BIT, + TYPEC_DRP_DFP_TIME_CFG_BIT); + if (rc < 0) { + dev_err(chg->dev, "Couldn't configure DRP.DFP time rc=%d\n", + rc); + return rc; + } + /* configure float charger options */ switch (chip->dt.float_option) { case 1: diff --git a/drivers/power/supply/qcom/smb-reg.h b/drivers/power/supply/qcom/smb-reg.h index d8671ab1fd06..4ddb085e9300 100644 --- a/drivers/power/supply/qcom/smb-reg.h +++ b/drivers/power/supply/qcom/smb-reg.h @@ -624,6 +624,7 @@ enum { #define TAPER_TIMER_SEL_CFG_REG (USBIN_BASE + 0x64) #define TYPEC_SPARE_CFG_BIT BIT(7) +#define TYPEC_DRP_DFP_TIME_CFG_BIT BIT(5) #define TAPER_TIMER_SEL_MASK GENMASK(1, 0) #define USBIN_LOAD_CFG_REG (USBIN_BASE + 0x65) |
