高通android设备themal读取cpu温度

以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博客

  • 7
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

xiaowang_lj

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值