mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
charging: optimize select pd capacity
optimize select pd capacity to cover more PD charger Change-Id: Ie67c3b530f6cfb250508ecec72b12de537492969 Signed-off-by: Haijian Ma <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2310810 Reviewed-by: Huosheng Liao <liaohs@motorola.com> SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Submit-Approved: Jira Key
This commit is contained in:
parent
0caa4ffe0d
commit
d1a2cf641d
1 changed files with 2 additions and 6 deletions
|
|
@ -1088,13 +1088,9 @@ int mmi_charger_update_pd_capacity(struct mmi_charger_manager *chip)
|
|||
chip->mmi_pd_pdo_idx,
|
||||
chip->mmi_pdo_info.max_mv[chip->mmi_pd_pdo_idx],
|
||||
chip->mmi_pdo_info.ma[chip->mmi_pd_pdo_idx]);
|
||||
if ((max_mv * 1000) <= pd_volt_max_init) {
|
||||
chip->pd_volt_max = max_mv * 1000;
|
||||
}
|
||||
|
||||
if ((max_ma * 1000) <= pd_curr_max_init) {
|
||||
chip->pd_curr_max = max_ma * 1000;
|
||||
}
|
||||
chip->pd_volt_max = min((max_mv * 1000), pd_volt_max_init);
|
||||
chip->pd_curr_max = min((max_ma * 1000), pd_curr_max_init);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue