diff options
author | Abhijeet Dharmapurikar <adharmap@codeaurora.org> | 2017-05-25 15:10:56 -0700 |
---|---|---|
committer | Abhijeet Dharmapurikar <adharmap@codeaurora.org> | 2017-05-26 11:29:37 -0700 |
commit | 85d191129ec4dbdeac1798584b562d853fc4be1d (patch) | |
tree | 6901ac47a843912419eb6f48e0b51869cc73b0d9 | |
parent | a2ab1656072a29a6a0f6e885b503fa51fd68e4e1 (diff) |
smb-lib: reset SDP draw to 100mA
The driver could leave SDP's current draw to a higher value
once its removed. This is because the code to reset the
current limit needs the type to be SDP to reset it which is
not going to be the case after removal.
So reset SDPs current limit back to 100mA in the code path
for non-SDP chargers.
Change-Id: Idfb9df1b72a17f1db63265b85f6546cbb77c4018
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
-rw-r--r-- | drivers/power/supply/qcom/smb-lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/supply/qcom/smb-lib.c b/drivers/power/supply/qcom/smb-lib.c index f16d4e32643a..4c66bc500ab4 100644 --- a/drivers/power/supply/qcom/smb-lib.c +++ b/drivers/power/supply/qcom/smb-lib.c @@ -866,6 +866,7 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua) goto enable_icl_changed_interrupt; } } else { + set_sdp_current(chg, 100000); rc = smblib_set_charge_param(chg, &chg->param.usb_icl, icl_ua); if (rc < 0) { smblib_err(chg, "Couldn't set HC ICL rc=%d\n", rc); |