diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2017-12-05 00:32:44 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-12-07 16:52:01 -0500 |
commit | ba0966da208ef0793486502a0e6b929fbd6d4223 (patch) | |
tree | 5e49c04ba44a67410be7b140de0e9ba832e1e1f7 | |
parent | f5f263fed66f75a4482d7ad49392b4283a05885a (diff) |
cpu_cooling: Remove unused cpufreq_power_cooling_register()
It isn't used by anyone, drop it.
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | Documentation/thermal/cpu-cooling-api.txt | 24 | ||||
-rw-r--r-- | drivers/thermal/cpu_cooling.c | 30 | ||||
-rw-r--r-- | include/linux/cpu_cooling.h | 10 |
3 files changed, 3 insertions, 61 deletions
diff --git a/Documentation/thermal/cpu-cooling-api.txt b/Documentation/thermal/cpu-cooling-api.txt index 4f6f5e9bb4d6..ea61e8bf7e2b 100644 --- a/Documentation/thermal/cpu-cooling-api.txt +++ b/Documentation/thermal/cpu-cooling-api.txt | |||
@@ -36,28 +36,14 @@ the user. The registration APIs returns the cooling device pointer. | |||
36 | np: pointer to the cooling device device tree node | 36 | np: pointer to the cooling device device tree node |
37 | clip_cpus: cpumask of cpus where the frequency constraints will happen. | 37 | clip_cpus: cpumask of cpus where the frequency constraints will happen. |
38 | 38 | ||
39 | 1.1.3 struct thermal_cooling_device *cpufreq_power_cooling_register( | 39 | 1.1.3 struct thermal_cooling_device *of_cpufreq_power_cooling_register( |
40 | const struct cpumask *clip_cpus, u32 capacitance, | ||
41 | get_static_t plat_static_func) | ||
42 | |||
43 | Similar to cpufreq_cooling_register, this function registers a cpufreq | ||
44 | cooling device. Using this function, the cooling device will | ||
45 | implement the power extensions by using a simple cpu power model. The | ||
46 | cpus must have registered their OPPs using the OPP library. | ||
47 | |||
48 | The additional parameters are needed for the power model (See 2. Power | ||
49 | models). "capacitance" is the dynamic power coefficient (See 2.1 | ||
50 | Dynamic power). "plat_static_func" is a function to calculate the | ||
51 | static power consumed by these cpus (See 2.2 Static power). | ||
52 | |||
53 | 1.1.4 struct thermal_cooling_device *of_cpufreq_power_cooling_register( | ||
54 | struct cpufreq_policy *policy) | 40 | struct cpufreq_policy *policy) |
55 | 41 | ||
56 | Similar to cpufreq_power_cooling_register, this function register a | 42 | Similar to cpufreq_cooling_register, this function register a |
57 | cpufreq cooling device with power extensions using the device tree | 43 | cpufreq cooling device with power extensions using the device tree |
58 | information supplied by the np parameter. | 44 | information supplied by the np parameter. |
59 | 45 | ||
60 | 1.1.5 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) | 46 | 1.1.4 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) |
61 | 47 | ||
62 | This interface function unregisters the "thermal-cpufreq-%x" cooling device. | 48 | This interface function unregisters the "thermal-cpufreq-%x" cooling device. |
63 | 49 | ||
@@ -74,10 +60,6 @@ cpu. If you are using CONFIG_CPUFREQ_DT then the | |||
74 | `cpufreq_frequency_table` should already be assigned to the cpu | 60 | `cpufreq_frequency_table` should already be assigned to the cpu |
75 | device. | 61 | device. |
76 | 62 | ||
77 | The `plat_static_func` parameter of `cpufreq_power_cooling_register()` | ||
78 | is optional. If you don't provide it, only dynamic power will be | ||
79 | considered. | ||
80 | |||
81 | 2.1 Dynamic power | 63 | 2.1 Dynamic power |
82 | 64 | ||
83 | The dynamic power consumption of a processor depends on many factors. | 65 | The dynamic power consumption of a processor depends on many factors. |
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index a31eb03c788e..10199f7e1196 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c | |||
@@ -842,36 +842,6 @@ of_cpufreq_cooling_register(struct device_node *np, | |||
842 | EXPORT_SYMBOL_GPL(of_cpufreq_cooling_register); | 842 | EXPORT_SYMBOL_GPL(of_cpufreq_cooling_register); |
843 | 843 | ||
844 | /** | 844 | /** |
845 | * cpufreq_power_cooling_register() - create cpufreq cooling device with power extensions | ||
846 | * @policy: cpufreq policy | ||
847 | * @capacitance: dynamic power coefficient for these cpus | ||
848 | * @plat_static_func: function to calculate the static power consumed by these | ||
849 | * cpus (optional) | ||
850 | * | ||
851 | * This interface function registers the cpufreq cooling device with | ||
852 | * the name "thermal-cpufreq-%x". This api can support multiple | ||
853 | * instances of cpufreq cooling devices. Using this function, the | ||
854 | * cooling device will implement the power extensions by using a | ||
855 | * simple cpu power model. The cpus must have registered their OPPs | ||
856 | * using the OPP library. | ||
857 | * | ||
858 | * An optional @plat_static_func may be provided to calculate the | ||
859 | * static power consumed by these cpus. If the platform's static | ||
860 | * power consumption is unknown or negligible, make it NULL. | ||
861 | * | ||
862 | * Return: a valid struct thermal_cooling_device pointer on success, | ||
863 | * on failure, it returns a corresponding ERR_PTR(). | ||
864 | */ | ||
865 | struct thermal_cooling_device * | ||
866 | cpufreq_power_cooling_register(struct cpufreq_policy *policy, u32 capacitance, | ||
867 | get_static_t plat_static_func) | ||
868 | { | ||
869 | return __cpufreq_cooling_register(NULL, policy, capacitance, | ||
870 | plat_static_func); | ||
871 | } | ||
872 | EXPORT_SYMBOL(cpufreq_power_cooling_register); | ||
873 | |||
874 | /** | ||
875 | * of_cpufreq_power_cooling_register() - create cpufreq cooling device with power extensions | 845 | * of_cpufreq_power_cooling_register() - create cpufreq cooling device with power extensions |
876 | * @policy: CPUFreq policy. | 846 | * @policy: CPUFreq policy. |
877 | * | 847 | * |
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index f09d4feb34f4..c35778960a9c 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h | |||
@@ -41,10 +41,6 @@ typedef int (*get_static_t)(cpumask_t *cpumask, int interval, | |||
41 | struct thermal_cooling_device * | 41 | struct thermal_cooling_device * |
42 | cpufreq_cooling_register(struct cpufreq_policy *policy); | 42 | cpufreq_cooling_register(struct cpufreq_policy *policy); |
43 | 43 | ||
44 | struct thermal_cooling_device * | ||
45 | cpufreq_power_cooling_register(struct cpufreq_policy *policy, | ||
46 | u32 capacitance, get_static_t plat_static_func); | ||
47 | |||
48 | /** | 44 | /** |
49 | * of_cpufreq_cooling_register - create cpufreq cooling device based on DT. | 45 | * of_cpufreq_cooling_register - create cpufreq cooling device based on DT. |
50 | * @np: a valid struct device_node to the cooling device device tree node. | 46 | * @np: a valid struct device_node to the cooling device device tree node. |
@@ -84,12 +80,6 @@ cpufreq_cooling_register(struct cpufreq_policy *policy) | |||
84 | { | 80 | { |
85 | return ERR_PTR(-ENOSYS); | 81 | return ERR_PTR(-ENOSYS); |
86 | } | 82 | } |
87 | static inline struct thermal_cooling_device * | ||
88 | cpufreq_power_cooling_register(struct cpufreq_policy *policy, | ||
89 | u32 capacitance, get_static_t plat_static_func) | ||
90 | { | ||
91 | return NULL; | ||
92 | } | ||
93 | 83 | ||
94 | static inline struct thermal_cooling_device * | 84 | static inline struct thermal_cooling_device * |
95 | of_cpufreq_cooling_register(struct device_node *np, | 85 | of_cpufreq_cooling_register(struct device_node *np, |