Thermal Framework Maintaince

Registered by Steve Jahnke

Based on thm-framework-architect, how to structure and maintain generic and board/arch-specific components.

Within the existing thermal framework, there are two main files that perform base functionality - thermal.c and thermal_sys.c. There are also /platform/arch specific files that map specific platforms thermal zones and cooling devices together. These files are created as system drivers. thermal.c, however, is in /acpi/drivers and provides the acpi hooks from the BIOS to thermal_sys.c, along with providing for the base algorithm to determine if a device is heating up or not. We will need to create a separate driver that abstracts to thermal_sys.c the same functionality thermal.c is providing, but be tied directly to on-die or system hardware. In ARM based-systems, since there is no acpi and the arch specific temp sensors of the existing thermal framework are kept in the /platform/arch specific directories, a decision will need to be made on how best to abstract out (or include at all) an equivalent thermal.c file, or simply tie directly to the /platform/arch specific temp sensors and cooling devices.

Blueprint information

Amit Kucheria
Steve Jahnke
Steve Jahnke
Series goal:
Accepted for trunk
Milestone target:
milestone icon 2011.09
Started by
Amit Kucheria
Completed by
Amit Kucheria

Related branches



  Each driver that is to connect to the thermal framework will have its own thermal framework driver; it will not need to create a hwmon driver first that is then read by thermal framework.

  The thermal framework has 3 major components, the core (which contains the framework logic and governor), thermal sensor drivers and cooling devices. For upstream integration, the framework is kept in a staging directory. The framework core and governor is located in drivers/staging/thermal_framework. The framework is kept at this root, while the governors are kept in a separate governor directory. The thermal sensors that tie directly to the framework are also kept in a separate sensor directory in drivers/staging/thermal_framework. The cooling devices are kept externally to the thermal framework. In this existing implementation, the DVFS framework is used to remove operating points to facilitate device cooling. The DVFS framework as a result needs an additional flag to stay it is present to the governor. As a result, there is currently no need to have cooling devices be directly present in the thermal framework directory structure.


Work Items

Work items:
[sjahnke] Define driver placement: DONE
[sjahnke] Define thermal framework core directory structure: DONE
[sjahnke] Define thermal framework governor directory structure: DONE

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.