提交 f8fa8ae0 编写于 作者: P Punit Agrawal 提交者: Rafael J. Wysocki

cpufreq-dt: Supply power coefficient when registering cooling devices

Support registering cooling devices with dynamic power coefficient
where provided by the device tree. This allows OF registered cooling
devices driver to be used with the power_allocator thermal governor.
Signed-off-by: NPunit Agrawal <punit.agrawal@arm.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: NJavi Merino <javi.merino@arm.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 3be3f8f3
...@@ -407,8 +407,13 @@ static void cpufreq_ready(struct cpufreq_policy *policy) ...@@ -407,8 +407,13 @@ static void cpufreq_ready(struct cpufreq_policy *policy)
* thermal DT code takes care of matching them. * thermal DT code takes care of matching them.
*/ */
if (of_find_property(np, "#cooling-cells", NULL)) { if (of_find_property(np, "#cooling-cells", NULL)) {
priv->cdev = of_cpufreq_cooling_register(np, u32 power_coefficient = 0;
policy->related_cpus);
of_property_read_u32(np, "dynamic-power-coefficient",
&power_coefficient);
priv->cdev = of_cpufreq_power_cooling_register(np,
policy->related_cpus, power_coefficient, NULL);
if (IS_ERR(priv->cdev)) { if (IS_ERR(priv->cdev)) {
dev_err(priv->cpu_dev, dev_err(priv->cpu_dev,
"running cpufreq without cooling device: %ld\n", "running cpufreq without cooling device: %ld\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册