ARM64: config: enable DRM relevant config
[firefly-linux-kernel-4.4.55.git] / include / linux / cpu_cooling.h
index c303d383def1146589a30c980d2c8dadd1bd89cc..c156f50827589c9547d48aac0072a30bf97672a5 100644 (file)
@@ -28,6 +28,9 @@
 #include <linux/thermal.h>
 #include <linux/cpumask.h>
 
+typedef int (*get_static_t)(cpumask_t *cpumask, int interval,
+                           unsigned long voltage, u32 *power);
+
 #ifdef CONFIG_CPU_THERMAL
 /**
  * cpufreq_cooling_register - function to create cpufreq cooling device.
 struct thermal_cooling_device *
 cpufreq_cooling_register(const struct cpumask *clip_cpus);
 
+struct thermal_cooling_device *
+cpufreq_power_cooling_register(const struct cpumask *clip_cpus,
+                              u32 capacitance, get_static_t plat_static_func);
+
 /**
  * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
  * @np: a valid struct device_node to the cooling device device tree node.
@@ -45,10 +52,25 @@ cpufreq_cooling_register(const struct cpumask *clip_cpus);
 struct thermal_cooling_device *
 of_cpufreq_cooling_register(struct device_node *np,
                            const struct cpumask *clip_cpus);
+
+struct thermal_cooling_device *
+of_cpufreq_power_cooling_register(struct device_node *np,
+                                 const struct cpumask *clip_cpus,
+                                 u32 capacitance,
+                                 get_static_t plat_static_func);
 #else
 static inline struct thermal_cooling_device *
 of_cpufreq_cooling_register(struct device_node *np,
                            const struct cpumask *clip_cpus)
+{
+       return ERR_PTR(-ENOSYS);
+}
+
+static inline struct thermal_cooling_device *
+of_cpufreq_power_cooling_register(struct device_node *np,
+                                 const struct cpumask *clip_cpus,
+                                 u32 capacitance,
+                                 get_static_t plat_static_func)
 {
        return NULL;
 }
@@ -64,15 +86,32 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq);
 #else /* !CONFIG_CPU_THERMAL */
 static inline struct thermal_cooling_device *
 cpufreq_cooling_register(const struct cpumask *clip_cpus)
+{
+       return ERR_PTR(-ENOSYS);
+}
+static inline struct thermal_cooling_device *
+cpufreq_power_cooling_register(const struct cpumask *clip_cpus,
+                              u32 capacitance, get_static_t plat_static_func)
 {
        return NULL;
 }
+
 static inline struct thermal_cooling_device *
 of_cpufreq_cooling_register(struct device_node *np,
                            const struct cpumask *clip_cpus)
+{
+       return ERR_PTR(-ENOSYS);
+}
+
+static inline struct thermal_cooling_device *
+of_cpufreq_power_cooling_register(struct device_node *np,
+                                 const struct cpumask *clip_cpus,
+                                 u32 capacitance,
+                                 get_static_t plat_static_func)
 {
        return NULL;
 }
+
 static inline
 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 {