From 3b3a3844ac8a32fa14de04fb2def18486862f4f1 Mon Sep 17 00:00:00 2001 From: yanyh2 Date: Tue, 28 Apr 2020 15:50:05 +0800 Subject: [PATCH] skip icl override again after setting sdp icl As icl override has been done in sdp icl setting, so there is no need to set icl override again after sdp icl settting. The icl override for the second time will use HW_AUTO_MODE so the HC mode in register 0x1366 will be enabled. In that case, the USB ICL settled will exceed 500mA with SDP APSD result if a non-standard USBA-C cable is attached. When use this USB cable, the typec orientation cannot be detected as it always shows 0, but typec mode can be detected. pm7250b_charger: smblib_update_usb_type: APSD=SDP PD=0 QC3P5=0 pm7250b_charger: smblib_icl_change_work: icl_settled=2450000 Change-Id: I3dee9b17a296d1f3a7f57f78a0162ced02f71c7e Signed-off-by: yanyh2 Reviewed-on: https://gerrit.mot.com/1544008 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Reviewed-by: Haijian Ma Tested-by: Jira Key Reviewed-by: Jianqi Yang Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1771041 Reviewed-by: Huosheng Liao --- drivers/power/supply/qcom/smb5-lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/power/supply/qcom/smb5-lib.c b/drivers/power/supply/qcom/smb5-lib.c index f8065ace4153..eab526c66c0a 100644 --- a/drivers/power/supply/qcom/smb5-lib.c +++ b/drivers/power/supply/qcom/smb5-lib.c @@ -1537,6 +1537,7 @@ int smblib_set_icl_current(struct smb_charger *chg, int icl_ua) smblib_err(chg, "Couldn't set SDP ICL rc=%d\n", rc); goto out; } + goto unsuspend; } else { /* * Try USB 2.0/3,0 option first on USB path when maximum input