charging: optimize wireless charging icl vote

As HW require, wireless charging icl vote from 500ma
for authentication

Change-Id: I922495b3f89a72f3a2b2b4306b941351614631e8
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2310686
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Haijian Ma 2022-06-23 15:17:12 +08:00
commit 0caa4ffe0d

View file

@ -1077,6 +1077,7 @@ static void mmi_discrete_config_qc_charger(struct mmi_discrete_charger *chg)
}
#define WLS_ICL_INCREASE_STEP 100000
#define WLS_ICL_MIN 500000
static void mmi_discrete_wireless_icl_work(struct work_struct *work)
{
struct mmi_discrete_charger *chip = container_of(work,
@ -1089,6 +1090,10 @@ static void mmi_discrete_wireless_icl_work(struct work_struct *work)
if(!is_wls_online(chip))
break;
wls_icl += WLS_ICL_INCREASE_STEP;
if (wls_icl < WLS_ICL_MIN)
wls_icl = WLS_ICL_MIN;
vote(chip->usb_icl_votable, SW_ICL_MAX_VOTER, true, wls_icl);
msleep(200);
wls_icl = get_client_vote(chip->usb_icl_votable, SW_ICL_MAX_VOTER);