kernel:battery temperature is zero during power on
authorxuwei9 <xuwei9@lenovo.com>
Mon, 7 Jan 2019 07:18:43 +0000 (15:18 +0800)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:36:52 +0000 (17:36 +0800)
battery temp is zero during
power on

Change-Id: If07b1b50e4ee49034ddc6f2064bb5f97271565d0
Signed-off-by: xuwei9 <xuwei9@mt.com>
Reviewed-on: https://gerrit.mot.com/1290370
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/power/supply/s2mu106_fuelgauge.c

index fb618ac7e4dfd3cb30c110382f13c3fd4434a24f..b3297c511ba922f6a9bd1aa3f9996749a7ef4f5f 100755 (executable)
@@ -1016,7 +1016,7 @@ static int s2mu106_get_rawsoc(struct s2mu106_fuelgauge_data *fuelgauge)
        ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_TEMP, &value);
        if (ret < 0)
                pr_err("%s: Fail to execute property\n", __func__);
-       fuelgauge->temperature = value.intval;
+       fuelgauge->temperature = ntc_show_batt_temp();
 #else
        fuelgauge->temperature = s2mu106_get_temperature(fuelgauge);
 #endif