Skip to content

Commit ba0966d

Browse files
vireshkrafaeljw
authored andcommitted
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>
1 parent f5f263f commit ba0966d

File tree

3 files changed

+3
-61
lines changed

3 files changed

+3
-61
lines changed

Documentation/thermal/cpu-cooling-api.txt

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,14 @@ the user. The registration APIs returns the cooling device pointer.
3636
np: pointer to the cooling device device tree node
3737
clip_cpus: cpumask of cpus where the frequency constraints will happen.
3838

39-
1.1.3 struct thermal_cooling_device *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(
39+
1.1.3 struct thermal_cooling_device *of_cpufreq_power_cooling_register(
5440
struct cpufreq_policy *policy)
5541

56-
Similar to cpufreq_power_cooling_register, this function register a
42+
Similar to cpufreq_cooling_register, this function register a
5743
cpufreq cooling device with power extensions using the device tree
5844
information supplied by the np parameter.
5945

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)
6147

6248
This interface function unregisters the "thermal-cpufreq-%x" cooling device.
6349

@@ -74,10 +60,6 @@ cpu. If you are using CONFIG_CPUFREQ_DT then the
7460
`cpufreq_frequency_table` should already be assigned to the cpu
7561
device.
7662

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-
8163
2.1 Dynamic power
8264

8365
The dynamic power consumption of a processor depends on many factors.

drivers/thermal/cpu_cooling.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -841,36 +841,6 @@ of_cpufreq_cooling_register(struct device_node *np,
841841
}
842842
EXPORT_SYMBOL_GPL(of_cpufreq_cooling_register);
843843

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-
874844
/**
875845
* of_cpufreq_power_cooling_register() - create cpufreq cooling device with power extensions
876846
* @policy: CPUFreq policy.

include/linux/cpu_cooling.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ typedef int (*get_static_t)(cpumask_t *cpumask, int interval,
4141
struct thermal_cooling_device *
4242
cpufreq_cooling_register(struct cpufreq_policy *policy);
4343

44-
struct thermal_cooling_device *
45-
cpufreq_power_cooling_register(struct cpufreq_policy *policy,
46-
u32 capacitance, get_static_t plat_static_func);
47-
4844
/**
4945
* of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
5046
* @np: a valid struct device_node to the cooling device device tree node.
@@ -84,12 +80,6 @@ cpufreq_cooling_register(struct cpufreq_policy *policy)
8480
{
8581
return ERR_PTR(-ENOSYS);
8682
}
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-
}
9383

9484
static inline struct thermal_cooling_device *
9585
of_cpufreq_cooling_register(struct device_node *np,

0 commit comments

Comments
 (0)