0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef __CPU_COOLING_H__
0014 #define __CPU_COOLING_H__
0015
0016 #include <linux/of.h>
0017 #include <linux/thermal.h>
0018 #include <linux/cpumask.h>
0019
0020 struct cpufreq_policy;
0021
0022 #ifdef CONFIG_CPU_FREQ_THERMAL
0023
0024
0025
0026
0027 struct thermal_cooling_device *
0028 cpufreq_cooling_register(struct cpufreq_policy *policy);
0029
0030
0031
0032
0033
0034 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
0035
0036
0037
0038
0039
0040 struct thermal_cooling_device *
0041 of_cpufreq_cooling_register(struct cpufreq_policy *policy);
0042
0043 #else
0044 static inline struct thermal_cooling_device *
0045 cpufreq_cooling_register(struct cpufreq_policy *policy)
0046 {
0047 return ERR_PTR(-ENOSYS);
0048 }
0049
0050 static inline
0051 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
0052 {
0053 return;
0054 }
0055
0056 static inline struct thermal_cooling_device *
0057 of_cpufreq_cooling_register(struct cpufreq_policy *policy)
0058 {
0059 return NULL;
0060 }
0061 #endif
0062
0063 struct cpuidle_driver;
0064
0065 #ifdef CONFIG_CPU_IDLE_THERMAL
0066 void cpuidle_cooling_register(struct cpuidle_driver *drv);
0067 #else
0068 static inline void cpuidle_cooling_register(struct cpuidle_driver *drv)
0069 {
0070 }
0071 #endif
0072
0073 #endif