This source file includes following definitions.
- of_devfreq_cooling_register_power
- of_devfreq_cooling_register
- devfreq_cooling_register
- devfreq_cooling_unregister
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef __DEVFREQ_COOLING_H__
18 #define __DEVFREQ_COOLING_H__
19
20 #include <linux/devfreq.h>
21 #include <linux/thermal.h>
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 struct devfreq_cooling_power {
56 unsigned long (*get_static_power)(struct devfreq *devfreq,
57 unsigned long voltage);
58 unsigned long (*get_dynamic_power)(struct devfreq *devfreq,
59 unsigned long freq,
60 unsigned long voltage);
61 int (*get_real_power)(struct devfreq *df, u32 *power,
62 unsigned long freq, unsigned long voltage);
63 unsigned long dyn_power_coeff;
64 };
65
66 #ifdef CONFIG_DEVFREQ_THERMAL
67
68 struct thermal_cooling_device *
69 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
70 struct devfreq_cooling_power *dfc_power);
71 struct thermal_cooling_device *
72 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df);
73 struct thermal_cooling_device *devfreq_cooling_register(struct devfreq *df);
74 void devfreq_cooling_unregister(struct thermal_cooling_device *dfc);
75
76 #else
77
78 static inline struct thermal_cooling_device *
79 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
80 struct devfreq_cooling_power *dfc_power)
81 {
82 return ERR_PTR(-EINVAL);
83 }
84
85 static inline struct thermal_cooling_device *
86 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df)
87 {
88 return ERR_PTR(-EINVAL);
89 }
90
91 static inline struct thermal_cooling_device *
92 devfreq_cooling_register(struct devfreq *df)
93 {
94 return ERR_PTR(-EINVAL);
95 }
96
97 static inline void
98 devfreq_cooling_unregister(struct thermal_cooling_device *dfc)
99 {
100 }
101
102 #endif
103 #endif