MTK平台的thermal机制是一种高温保护主板机制。主要用于手机在充电过程中,温度太高对手机主板造成损坏。
thermal主要由thermal配置文件和thermal的驱动代码进行控制。
从一个充电温度高电流降到0的bug开始讲解:
首先从log中看到:
<6>[34586.470707] (2)[16839:3ATHREAD]GC5025_camera_sensor[feature_control] feature_id = 3084
<4>[34586.553323] (1)[22062:kworker/u8:3][Thermal/TC/bcct]chrlmt_set_limit c14b4178 -1 200 0
<4>[34586.553424] (2)[7858:kworker/u9:0][Thermal/TC/bcct]chrlmt_set_limit_handler -1 200
<5>[34586.553435] (2)[7858:kworker/u9:0]charger_manager_set_input_current_limit: dev:mtk-cooler-bcct idx:0 en:-1
<5>[34586.553446] (2)[7858:kworker/u9:0]force:0 thermal:450000 setting:450000 type:4 usb_unlimited:0 usbif:0 usbsm:0
<5>[34586.553507] (2)[7858:kworker/u9:0]charger_manager_set_charging_current_limit: dev:mtk-cooler-bcct idx:0 en:200000
<5>[34586.553515] (2)[7858:kworker/u9:0]force:0 thermal:200000 setting:200000 type:4 usb_unlimited:0 usbif