Thermal Driver Overview

Block Diagram

The following figure shows the block diagram of the thermal system interface.
Figure 1. Block Diagram

Linux Thermal Framework

The JH-7110 thermal system is built on the standard Linux thermal framework. Understanding the framework helps when modifying device tree bindings or debugging thermal behavior.
kernel/
|-- drivers/thermal/thermal_core.c //thermal sensor core code
|-- drivers/thermal/cpu_cooling.c //thermal cpu cooling code
|-- drivers/thermal/gov_step_wise.c //step-wise governor code
|-- drivers/thermal/thermal_of.c // OF-thermal code
Table 1. Linux Thermal Framework
Component Kernel Source Description
Thermal Core thermal_core.c Registers thermal zones, manages trip points, invokes governors
CPU Cooling cpu_cooling.c Maps CPU frequency scaling to cooling states
Thermal Governor gov_step_wise.c Default governor; adjusts cooling state by one step at a time
OF-thermal thermal_of.c Parses thermal configuration from device tree