diff options
Diffstat (limited to 'include/linux/cpu_cooling.h')
-rw-r--r-- | include/linux/cpu_cooling.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index a5d52eea8232..c303d383def1 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #ifndef __CPU_COOLING_H__ | 24 | #ifndef __CPU_COOLING_H__ |
25 | #define __CPU_COOLING_H__ | 25 | #define __CPU_COOLING_H__ |
26 | 26 | ||
27 | #include <linux/of.h> | ||
27 | #include <linux/thermal.h> | 28 | #include <linux/thermal.h> |
28 | #include <linux/cpumask.h> | 29 | #include <linux/cpumask.h> |
29 | 30 | ||
@@ -36,6 +37,24 @@ struct thermal_cooling_device * | |||
36 | cpufreq_cooling_register(const struct cpumask *clip_cpus); | 37 | cpufreq_cooling_register(const struct cpumask *clip_cpus); |
37 | 38 | ||
38 | /** | 39 | /** |
40 | * of_cpufreq_cooling_register - create cpufreq cooling device based on DT. | ||
41 | * @np: a valid struct device_node to the cooling device device tree node. | ||
42 | * @clip_cpus: cpumask of cpus where the frequency constraints will happen | ||
43 | */ | ||
44 | #ifdef CONFIG_THERMAL_OF | ||
45 | struct thermal_cooling_device * | ||
46 | of_cpufreq_cooling_register(struct device_node *np, | ||
47 | const struct cpumask *clip_cpus); | ||
48 | #else | ||
49 | static inline struct thermal_cooling_device * | ||
50 | of_cpufreq_cooling_register(struct device_node *np, | ||
51 | const struct cpumask *clip_cpus) | ||
52 | { | ||
53 | return NULL; | ||
54 | } | ||
55 | #endif | ||
56 | |||
57 | /** | ||
39 | * cpufreq_cooling_unregister - function to remove cpufreq cooling device. | 58 | * cpufreq_cooling_unregister - function to remove cpufreq cooling device. |
40 | * @cdev: thermal cooling device pointer. | 59 | * @cdev: thermal cooling device pointer. |
41 | */ | 60 | */ |
@@ -48,6 +67,12 @@ cpufreq_cooling_register(const struct cpumask *clip_cpus) | |||
48 | { | 67 | { |
49 | return NULL; | 68 | return NULL; |
50 | } | 69 | } |
70 | static inline struct thermal_cooling_device * | ||
71 | of_cpufreq_cooling_register(struct device_node *np, | ||
72 | const struct cpumask *clip_cpus) | ||
73 | { | ||
74 | return NULL; | ||
75 | } | ||
51 | static inline | 76 | static inline |
52 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) | 77 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) |
53 | { | 78 | { |