日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Thermal记录

發布時間:2023/12/16 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Thermal记录 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

高通865,內核版本4.19

drivers/thermal/of-thermal.c

thermal_of_populate_trip? ?//解析trip具體參數??tz->ntrips

thermal_of_build_thermal_zone? // 解析每個zone 用于生成/sys/devices/virtual/thermal/thermal_zone*各個虛擬設備和節點,返回結構體__thermal_zone

of_parse_thermal_zones調用thermal_of_build_thermal_zone解析設備樹

?

核心函數:

void thermal_zone_device_update(struct thermal_zone_device *tz,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? enum thermal_notify_event event)
{
? ? ? ? int count;

? ? ? ? if (atomic_read(&in_suspend) && (!tz->ops->is_wakeable ||
? ? ? ? ? ? ? ? !(tz->ops->is_wakeable(tz))))
? ? ? ? ? ? ? ? return;

? ? ? ? if (!tz->ops->get_temp)
? ? ? ? ? ? ? ? return;

? ? ? ? trace_thermal_device_update(tz, event);
? ? ? ? update_temperature(tz);

? ? ? ? thermal_zone_set_trips(tz);

? ? ? ? tz->notify_event = event;

? ? ? ? for (count = 0; count < tz->trips; count++)
? ? ? ? ? ? ? ? handle_thermal_trip(tz, count);
}

thermal_zone_set_trips? 計算low 和 high,并調用

// Set a temperature window. When this window is left the driver
//?must inform the thermal core via thermal_zone_device_update.
ret = tz->ops->set_trips(tz, low, high); 這個函數會設置到硬件寄存器里,bcl對應下面三個設置函數

qcom/bcl_pmic5.c:507:?? ?vbat->ops.set_trips = bcl_set_vbat;
qcom/bcl_pmic5.c:542:?? ?ibat->ops.set_trips = bcl_set_ibat;
qcom/bcl_pmic5.c:576:?? ?lbat->ops.set_trips = bcl_set_lbat;

?

?

?

?

?

?

?

?

總結

以上是生活随笔為你收集整理的Thermal记录的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。