![我可以从寄存器读取CPU温度吗](https://linux22.com/image/160604/%E6%88%91%E5%8F%AF%E4%BB%A5%E4%BB%8E%E5%AF%84%E5%AD%98%E5%99%A8%E8%AF%BB%E5%8F%96CPU%E6%B8%A9%E5%BA%A6%E5%90%97.png)
我正在研究 raspberry pi b+,我想读取内核文件中的 CPU 温度。热传感器在设备树中定义:
thermal: thermal@7e212000 {
compatible = "brcm,bcm2835-thermal";
reg = <0x7e212000 0x8>;
clocks = <&clocks BCM2835_CLOCK_TSENS>;
#thermal-sensor-cells = <0>;
status = "disabled";
};
所以我知道寄存器地址和长度。我想知道是否可以通过直接在内核文件中读取该寄存器来获取CPU温度。