charger: optimize the turbo power show for dcp

For default DCP charger type, it should show the normal charge rate.
Optimize the charge rate for default DCP.

Change-Id: I36aabc784e77dd44d88d65840d6f0ff67b3c33bc
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2760894
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Lei Chen 2023-10-08 17:34:15 +08:00 • committed by Lei Chen
commit a1ff1a2a9c

View file

@ -2978,6 +2978,11 @@ static int mmi_discrete_get_chg_info(void *data, struct mmi_charger_info *chg_in
if (chip->chg_info.chrg_pmax_mw < (usb_icl * 5 / 1000))
chip->chg_info.chrg_pmax_mw = usb_icl * 5 / 1000;
if(!typec_rp_med_high(chip, chip->typec_mode)
&& (usb_type == POWER_SUPPLY_TYPE_USB_DCP)
&& (chip->chg_info.chrg_pmax_mw > 12500)) {
chip->chg_info.chrg_pmax_mw = 12000; //Show normal charge rate for default DCP
}
rc = 0;
goto completed;
}