以msm8953的themal分布信息,主要是下图的位置:

这其中 cpu相关的themal的位置有:

读取thermal 温度数据可以通过以下几个步骤:

获取sensor_info

 
  1. root@msm8953_64:/ # cat /sys/module/msm_thermal/sensor_info

  2. tsens:tsens_tz_sensor0::10

  3. tsens:tsens_tz_sensor1::10

  4. tsens:tsens_tz_sensor2:pop_mem:10

  5. tsens:tsens_tz_sensor3::10

  6. tsens:tsens_tz_sensor4:cpu4:10

  7. tsens:tsens_tz_sensor5:cpu5:10

  8. tsens:tsens_tz_sensor6:cpu6:10

  9. tsens:tsens_tz_sensor7:cpu7:10

  10. tsens:tsens_tz_sensor8:L2_cache_1:10

  11. tsens:tsens_tz_sensor9:cpu0:10

  12. tsens:tsens_tz_sensor10:cpu1:10

  13. tsens:tsens_tz_sensor11:cpu2:10

  14. tsens:tsens_tz_sensor12:cpu3:10

  15. tsens:tsens_tz_sensor13:L2_cache_0:10

  16. tsens:tsens_tz_sensor14::10

  17. tsens:tsens_tz_sensor15:gpu:10

  18. alarm:pm8953_tz::1000

  19. adc:pa_therm0::1

  20. adc:pa_therm1::1

  21. adc:xo_therm::1

  22. adc:xo_therm_buf::1

  23. adc:case_therm::1

在/sys/class/thermal/ 路径下可以看到所有的thermal_zone
 

 
  1. msm8953_64:/sys/class/thermal # ls

  2. thermal_zone0 thermal_zone11 thermal_zone14 thermal_zone17 thermal_zone2 thermal_zone22 thermal_zone4 thermal_zone7

  3. thermal_zone1 thermal_zone12 thermal_zone15 thermal_zone18 thermal_zone20 thermal_zone23 thermal_zone5 thermal_zone8

  4. thermal_zone10 thermal_zone13 thermal_zone16 thermal_zone19 thermal_zone21 thermal_zone3 thermal_zone6 thermal_zone9

那么怎么知道具体的温度信息就需要结合上面的sensor_info来对比分析了。

先获取所有的tmpe信息:
 

 
  1. msm8953_64:/sys/class/thermal # cat */temp

  2. 25000

  3. -40

  4. 309

  5. 309

  6. 313

  7. 322

  8. 309

  9. 306

  10. 309

  11. 319

  12. 313

  13. 303

  14. 31

  15. 306

  16. 32636

  17. 30

  18. 25000

  19. 30

  20. 7

  21. 24612

  22. 306

  23. 306

  24. 306

  25. 322

  26. bms

每个节点对应的type

 
  1. msm8953_64:/sys/class/thermal # cat */type

  2. bms

  3. pa_therm1

  4. tsens_tz_sensor5

  5. tsens_tz_sensor6

  6. tsens_tz_sensor7

  7. tsens_tz_sensor8

  8. tsens_tz_sensor9

  9. tsens_tz_sensor10

  10. tsens_tz_sensor11

  11. tsens_tz_sensor12

  12. tsens_tz_sensor13

  13. tsens_tz_sensor14

  14. xo_therm

  15. tsens_tz_sensor15

  16. pm8953_tz

  17. pa_therm0

  18. battery

  19. xo_therm_buf

  20. case_therm

  21. chg_temp

  22. tsens_tz_sensor1

  23. tsens_tz_sensor2

  24. tsens_tz_sensor3

  25. tsens_tz_sensor4

这3者信息相结合,即可得到该thermal的温度信息;

举一个例子:

thermal_zone10 –> tsens_tz_sensor5 -> 309

在sensor_info中这个节点的信息是tsens:tsens_tz_sensor5:cpu5:10

最后的10 表示比例是1:10,也就是表示309是表示cpu5的温度是30.9摄氏度。

高通android设备themal读取cpu温度_android 获取cpu温度-CSDN博客

更多推荐