Loading drivers/power/supply/qcom/smb5-lib.c +11 −2 Original line number Diff line number Diff line Loading @@ -1078,7 +1078,6 @@ static int set_sdp_current(struct smb_charger *chg, int icl_ua) icl_options = CFG_USB3P0_SEL_BIT | USB51_MODE_BIT; break; default: smblib_err(chg, "ICL %duA isn't supported for SDP\n", icl_ua); return -EINVAL; } Loading Loading @@ -1164,7 +1163,17 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua) goto out; } } else { set_sdp_current(chg, 100000); /* * Try USB 2.0/3,0 option first on USB path when maximum input * current limit is 500mA or below for better accuracy; in case * of error, proceed to use USB high-current mode. */ if (icl_ua <= USBIN_500MA) { rc = set_sdp_current(chg, icl_ua); if (rc >= 0) goto out; } 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); Loading Loading
drivers/power/supply/qcom/smb5-lib.c +11 −2 Original line number Diff line number Diff line Loading @@ -1078,7 +1078,6 @@ static int set_sdp_current(struct smb_charger *chg, int icl_ua) icl_options = CFG_USB3P0_SEL_BIT | USB51_MODE_BIT; break; default: smblib_err(chg, "ICL %duA isn't supported for SDP\n", icl_ua); return -EINVAL; } Loading Loading @@ -1164,7 +1163,17 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua) goto out; } } else { set_sdp_current(chg, 100000); /* * Try USB 2.0/3,0 option first on USB path when maximum input * current limit is 500mA or below for better accuracy; in case * of error, proceed to use USB high-current mode. */ if (icl_ua <= USBIN_500MA) { rc = set_sdp_current(chg, icl_ua); if (rc >= 0) goto out; } 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); Loading