diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-01-17 20:52:42 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-01-17 20:52:42 -0500 |
commit | f06970f4b03dffeb9831a8ad605db3c85a55aca1 (patch) | |
tree | a4477a4878350d63e3399e7f0d57d64e26065f09 /drivers/cpufreq/mediatek-cpufreq.c | |
parent | 343a8d17fa8d6dd97f408e8fedbcef12073f3774 (diff) | |
parent | ac89c400ebb146604e718b3fa168c15592e73a8c (diff) |
Merge branch 'pm-cpufreq-thermal' into pm-cpufreq
* pm-cpufreq-thermal:
cpu_cooling: Remove static-power related documentation
cpu_cooling: Drop static-power related stuff
cpu_cooling: Keep only one of_cpufreq*cooling_register() helper
cpu_cooling: Remove unused cpufreq_power_cooling_register()
cpu_cooling: Make of_cpufreq_power_cooling_register() parse DT
Diffstat (limited to 'drivers/cpufreq/mediatek-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/mediatek-cpufreq.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index b783919f063d..8c04dddd3c28 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c | |||
@@ -310,28 +310,8 @@ static int mtk_cpufreq_set_target(struct cpufreq_policy *policy, | |||
310 | static void mtk_cpufreq_ready(struct cpufreq_policy *policy) | 310 | static void mtk_cpufreq_ready(struct cpufreq_policy *policy) |
311 | { | 311 | { |
312 | struct mtk_cpu_dvfs_info *info = policy->driver_data; | 312 | struct mtk_cpu_dvfs_info *info = policy->driver_data; |
313 | struct device_node *np = of_node_get(info->cpu_dev->of_node); | ||
314 | u32 capacitance = 0; | ||
315 | 313 | ||
316 | if (WARN_ON(!np)) | 314 | info->cdev = of_cpufreq_cooling_register(policy); |
317 | return; | ||
318 | |||
319 | if (of_find_property(np, "#cooling-cells", NULL)) { | ||
320 | of_property_read_u32(np, DYNAMIC_POWER, &capacitance); | ||
321 | |||
322 | info->cdev = of_cpufreq_power_cooling_register(np, | ||
323 | policy, capacitance, NULL); | ||
324 | |||
325 | if (IS_ERR(info->cdev)) { | ||
326 | dev_err(info->cpu_dev, | ||
327 | "running cpufreq without cooling device: %ld\n", | ||
328 | PTR_ERR(info->cdev)); | ||
329 | |||
330 | info->cdev = NULL; | ||
331 | } | ||
332 | } | ||
333 | |||
334 | of_node_put(np); | ||
335 | } | 315 | } |
336 | 316 | ||
337 | static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu) | 317 | static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, int cpu) |