[MTK] 设定battery温度

文摘 MediaTek 2020-10-5 阅读:305

[DESCRIPTION]

 项目前期,可能battery没有ready,会报battery thermal关机,导致手机开不起来。

 [sys.powerctl]=[shutdown,thermal,battery]

[SOLUTION]

 参考如下临时patch,将battery温度固定在25度。

 diff --git a/drivers/power/supply/mediatek/battery/mtk_battery.c b/drivers/power/supply/mediatek/battery/mtk_battery.c
index da936706e868..2168681acfb4 100644
--- a/drivers/power/supply/mediatek/battery/mtk_battery.c
+++ b/drivers/power/supply/mediatek/battery/mtk_battery.c
@@ -1472,6 +1472,7 @@ int force_get_tbat_internal(bool update)
static struct timespec pre_time;
struct timespec ctime, dtime;

+ gm.fixed_bat_tmp = 25;
if (is_battery_init_done() == false) {
gm.tbat_precise = 250;
return 25;


0条评论

© 2020 芯缘异码. Powered by Typecho