gauge: force set sm5602 temperature to 25 degree

factory bt stattion no batt ntc resistance,
sm5602 adc get temperature is -20 or 80, force set it to 25 degree.

Change-Id: I2de7a9122e3f06d9c3ea7a150469b033f891841f
Signed-off-by: huaqin85 <huaqin85@motorola.com>
Reviewed-on: https://gerrit.mot.com/2175723
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
huaqin85 2022-01-20 22:15:25 +08:00
commit d7e4e0874d

View file

@ -509,7 +509,7 @@ static int _calculate_battery_temp_ex(struct sm_fg_chip *sm, u16 uval)
pr_info("uval = 0x%x, val = 0x%x, temp = %d\n",uval, val, temp);
if(sm->factory_mode && !sm->ntc_exist && (-20 == temp))
if(sm->factory_mode && !sm->ntc_exist && ((-20 == temp) || (80 == temp)))
temp = 25;
return temp;
}