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>
This commit is contained in:
Abhijeet Dharmapurikar 2017-05-25 15:10:56 -07:00
parent a2ab165607
commit 85d191129e

View file

@ -866,6 +866,7 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua)
goto enable_icl_changed_interrupt; goto enable_icl_changed_interrupt;
} }
} else { } else {
set_sdp_current(chg, 100000);
rc = smblib_set_charge_param(chg, &chg->param.usb_icl, icl_ua); rc = smblib_set_charge_param(chg, &chg->param.usb_icl, icl_ua);
if (rc < 0) { if (rc < 0) {
smblib_err(chg, "Couldn't set HC ICL rc=%d\n", rc); smblib_err(chg, "Couldn't set HC ICL rc=%d\n", rc);