diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-05-26 00:09:37 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-26 00:09:36 -0700 |
| commit | 21dd810c7cf2a265c34fa4fe7eb7ccfe4e1cf50c (patch) | |
| tree | 9f5aa03cd556c419858c5a8fbfdf6368e3a07798 | |
| parent | b7e32b139c0ae2870729ad5797a25cafee408d85 (diff) | |
| parent | ebb7ac6bd40c9b839eb50d15ee654b5829eb670c (diff) | |
Merge "qpnp-smb2: update AICL rerun logic for PM660"
| -rw-r--r-- | drivers/power/supply/qcom/smb-lib.c | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/drivers/power/supply/qcom/smb-lib.c b/drivers/power/supply/qcom/smb-lib.c index 31116b2ec5c7..f6262f94ce01 100644 --- a/drivers/power/supply/qcom/smb-lib.c +++ b/drivers/power/supply/qcom/smb-lib.c @@ -1889,37 +1889,17 @@ int smblib_rerun_aicl(struct smb_charger *chg) return rc; smblib_dbg(chg, PR_MISC, "re-running AICL\n"); - switch (chg->smb_version) { - case PMI8998_SUBTYPE: - rc = smblib_get_charge_param(chg, &chg->param.icl_stat, - &settled_icl_ua); - if (rc < 0) { - smblib_err(chg, "Couldn't get settled ICL rc=%d\n", rc); - return rc; - } + rc = smblib_get_charge_param(chg, &chg->param.icl_stat, + &settled_icl_ua); + if (rc < 0) { + smblib_err(chg, "Couldn't get settled ICL rc=%d\n", rc); + return rc; + } - vote(chg->usb_icl_votable, AICL_RERUN_VOTER, true, - max(settled_icl_ua - chg->param.usb_icl.step_u, + vote(chg->usb_icl_votable, AICL_RERUN_VOTER, true, + max(settled_icl_ua - chg->param.usb_icl.step_u, chg->param.usb_icl.step_u)); - vote(chg->usb_icl_votable, AICL_RERUN_VOTER, false, 0); - break; - case PM660_SUBTYPE: - /* - * Use restart_AICL instead of trigger_AICL as it runs the - * complete AICL instead of starting from the last settled - * value. - */ - rc = smblib_masked_write(chg, CMD_HVDCP_2_REG, - RESTART_AICL_BIT, RESTART_AICL_BIT); - if (rc < 0) - smblib_err(chg, "Couldn't write to CMD_HVDCP_2_REG rc=%d\n", - rc); - break; - default: - smblib_dbg(chg, PR_PARALLEL, "unknown SMB chip %d\n", - chg->smb_version); - return -EINVAL; - } + vote(chg->usb_icl_votable, AICL_RERUN_VOTER, false, 0); return 0; } |
