mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
power: smb5-lib: Vote USB_ICL after PD active
the usb_icl_votable has been voted at policy-engine through the PD communication protocol, In smblib_pd_contract_work, we actually needn't override its setting, if want to re-vote it, the value must not be greater than the result after PD contract. Change-Id: I4a9c7c52709c60fa51a6d1aa2125bbafb52e81df Signed-off-by: xuwt2 <xuwt2@lenovo.com> Reviewed-on: https://gerrit.mot.com/1636223 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-by: Haijian Ma <mahj8@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1771126
This commit is contained in:
parent
c1717e45fa
commit
9a07f7885f
1 changed files with 4 additions and 0 deletions
|
|
@ -7436,6 +7436,10 @@ static void smblib_pd_contract_work(struct work_struct *work)
|
|||
smblib_set_opt_switcher_freq(chg, chg->chg_freq.freq_5V);
|
||||
|
||||
max_ua = (MAX_INPUT_PWR_UW / (chg->pd_contract_uv / 1000)) * 1000;
|
||||
|
||||
if (get_client_vote(chg->usb_icl_votable, PD_VOTER) > 0)
|
||||
max_ua = min(max_ua, get_client_vote(chg->usb_icl_votable, PD_VOTER));
|
||||
|
||||
smblib_err(chg, "smblib_pd_contract_work: %d uV, %d uA\n",
|
||||
chg->pd_contract_uv, max_ua);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue