[lkml]   [2019]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v1 01/10] cpufreq: Add thermal_cooling_device pointer to struct cpufreq_policy
Several cpufreq drivers register themselves as thermal cooling devices.
Adding a pointer to struct cpufreq_policy removes the need for them to
store this pointer in a private data structure.

We can then auto-register the cpufreq driver as a thermal cooling device
from cpufreq core code.

Signed-off-by: Amit Kucheria <>
include/linux/cpufreq.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index c86d6d8bdfed..7d0cf54125fa 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -95,6 +95,11 @@ struct cpufreq_policy {
struct cpufreq_frequency_table *freq_table;
enum cpufreq_table_sorting freq_table_sorted;

+ /* Pointer to the cooling device if used for thermal mitigation */
+ struct thermal_cooling_device *cooldev;
struct list_head policy_list;
struct kobject kobj;
struct completion kobj_unregister;
 \ /
  Last update: 2019-01-14 17:36    [W:0.082 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site