This source file includes following definitions.
- cpufreq_cooling_register
- cpufreq_cooling_unregister
- of_cpufreq_cooling_register
1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef __CPU_COOLING_H__
14 #define __CPU_COOLING_H__
15
16 #include <linux/of.h>
17 #include <linux/thermal.h>
18 #include <linux/cpumask.h>
19
20 struct cpufreq_policy;
21
22 #ifdef CONFIG_CPU_THERMAL
23
24
25
26
27 struct thermal_cooling_device *
28 cpufreq_cooling_register(struct cpufreq_policy *policy);
29
30
31
32
33
34 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
35
36 #else
37 static inline struct thermal_cooling_device *
38 cpufreq_cooling_register(struct cpufreq_policy *policy)
39 {
40 return ERR_PTR(-ENOSYS);
41 }
42
43 static inline
44 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
45 {
46 return;
47 }
48 #endif
49
50 #if defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL)
51
52
53
54
55 struct thermal_cooling_device *
56 of_cpufreq_cooling_register(struct cpufreq_policy *policy);
57 #else
58 static inline struct thermal_cooling_device *
59 of_cpufreq_cooling_register(struct cpufreq_policy *policy)
60 {
61 return NULL;
62 }
63 #endif
64
65 #endif