mmi_charger:init thermal parameter at high temp

PD charger hard reset as the thermal request current is 0.
Init the thermal parameter at the highest thermal level.
Pick from https://gerrit.mot.com/#/c/2006952/

Change-Id: If07718fa3d7f8e51ce8df7ad05ff740519c4aab3
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2643326
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
This commit is contained in:
Lei Chen 2023-06-14 17:25:18 +08:00 • committed by Lei Chen
commit d8037661fe

View file

@ -1289,6 +1289,14 @@ schedule:
mmi_chrg_info(chip, "Thermal is the highest, level %d, "
"Force enter into single pmic charging !\n",
chip->system_thermal_level);
if(chip->pd_sys_therm_volt == 0)
chip->pd_sys_therm_volt = SWITCH_CHARGER_PPS_VOLT;
if(chip->pd_sys_therm_curr == 0)
chip->pd_sys_therm_curr = TYPEC_HIGH_CURRENT_UA;
if(chip->pd_batt_therm_volt == 0)
chip->pd_batt_therm_volt = SWITCH_CHARGER_PPS_VOLT;
if(chip->pd_batt_therm_curr == 0)
chip->pd_batt_therm_curr = TYPEC_HIGH_CURRENT_UA;
} else if (chip->system_thermal_level > 0 &&
(sm_state == PM_STATE_CP_CC_LOOP ||