diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpu_cooling.h | 53 |
1 files changed, 14 insertions, 39 deletions
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index c35778960a9c..fd0ea8ddca93 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h | |||
| @@ -42,33 +42,6 @@ struct thermal_cooling_device * | |||
| 42 | cpufreq_cooling_register(struct cpufreq_policy *policy); | 42 | cpufreq_cooling_register(struct cpufreq_policy *policy); |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| 45 | * of_cpufreq_cooling_register - create cpufreq cooling device based on DT. | ||
| 46 | * @np: a valid struct device_node to the cooling device device tree node. | ||
| 47 | * @policy: cpufreq policy. | ||
| 48 | */ | ||
| 49 | #ifdef CONFIG_THERMAL_OF | ||
| 50 | struct thermal_cooling_device * | ||
| 51 | of_cpufreq_cooling_register(struct device_node *np, | ||
| 52 | struct cpufreq_policy *policy); | ||
| 53 | |||
| 54 | struct thermal_cooling_device * | ||
| 55 | of_cpufreq_power_cooling_register(struct cpufreq_policy *policy); | ||
| 56 | #else | ||
| 57 | static inline struct thermal_cooling_device * | ||
| 58 | of_cpufreq_cooling_register(struct device_node *np, | ||
| 59 | struct cpufreq_policy *policy) | ||
| 60 | { | ||
| 61 | return ERR_PTR(-ENOSYS); | ||
| 62 | } | ||
| 63 | |||
| 64 | static inline struct thermal_cooling_device * | ||
| 65 | of_cpufreq_power_cooling_register(struct cpufreq_policy *policy) | ||
| 66 | { | ||
| 67 | return NULL; | ||
| 68 | } | ||
| 69 | #endif | ||
| 70 | |||
| 71 | /** | ||
| 72 | * cpufreq_cooling_unregister - function to remove cpufreq cooling device. | 45 | * cpufreq_cooling_unregister - function to remove cpufreq cooling device. |
| 73 | * @cdev: thermal cooling device pointer. | 46 | * @cdev: thermal cooling device pointer. |
| 74 | */ | 47 | */ |
| @@ -81,24 +54,26 @@ cpufreq_cooling_register(struct cpufreq_policy *policy) | |||
| 81 | return ERR_PTR(-ENOSYS); | 54 | return ERR_PTR(-ENOSYS); |
| 82 | } | 55 | } |
| 83 | 56 | ||
| 84 | static inline struct thermal_cooling_device * | 57 | static inline |
| 85 | of_cpufreq_cooling_register(struct device_node *np, | 58 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) |
| 86 | struct cpufreq_policy *policy) | ||
| 87 | { | 59 | { |
| 88 | return ERR_PTR(-ENOSYS); | 60 | return; |
| 89 | } | 61 | } |
| 62 | #endif /* CONFIG_CPU_THERMAL */ | ||
| 90 | 63 | ||
| 64 | #if defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL) | ||
| 65 | /** | ||
| 66 | * of_cpufreq_cooling_register - create cpufreq cooling device based on DT. | ||
| 67 | * @policy: cpufreq policy. | ||
| 68 | */ | ||
| 69 | struct thermal_cooling_device * | ||
| 70 | of_cpufreq_cooling_register(struct cpufreq_policy *policy); | ||
| 71 | #else | ||
| 91 | static inline struct thermal_cooling_device * | 72 | static inline struct thermal_cooling_device * |
| 92 | of_cpufreq_power_cooling_register(struct cpufreq_policy *policy) | 73 | of_cpufreq_cooling_register(struct cpufreq_policy *policy) |
| 93 | { | 74 | { |
| 94 | return NULL; | 75 | return NULL; |
| 95 | } | 76 | } |
| 96 | 77 | #endif /* defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL) */ | |
| 97 | static inline | ||
| 98 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) | ||
| 99 | { | ||
| 100 | return; | ||
| 101 | } | ||
| 102 | #endif /* CONFIG_CPU_THERMAL */ | ||
| 103 | 78 | ||
| 104 | #endif /* __CPU_COOLING_H__ */ | 79 | #endif /* __CPU_COOLING_H__ */ |
