mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
charge: Skip AICL when usb /charger cable is not connected
The prerequisite for AICL is that VBUS is required, so when usb or charger cable is not connected (neither usbin nor dcin exists), we need to skip re-run AICL. Change-Id: I2d039fbfaa090ac3e7682e4ddb9889a278503484 Signed-off-by: Guocheng Wang <wanggc6@motorola.com> Reviewed-on: https://gerrit.mot.com/2760500 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wei Wei <weiweij@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
a4f0de2f15
commit
b593dc6aee
1 changed files with 4 additions and 0 deletions
|
|
@ -2654,6 +2654,10 @@ int smblib_run_aicl(struct smb_charger *chg, int type)
|
|||
if (stat & USBIN_SUSPEND_STS_BIT)
|
||||
return rc;
|
||||
|
||||
/* Neither usbin nor dcin exists so skip re-running AICL */
|
||||
if (!(stat & (USE_USBIN_BIT | USE_DCIN_BIT)))
|
||||
return rc;
|
||||
|
||||
smblib_dbg(chg, PR_MISC, "re-running AICL\n");
|
||||
|
||||
stat = (type == RERUN_AICL) ? RERUN_AICL_BIT : RESTART_AICL_BIT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue