Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265887
| From | Punit Agrawal <punit.agrawal@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 2/3] cpufreq-dt: Supply power coefficient when registering cooling devices |
| Date | 2015-11-09 18:40 +0100 |
| Message-ID | <qsYA9-123-1@gated-at.bofh.it> (permalink) |
| References | <qsYqt-YN-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Eduardo Valentin <edubezval@gmail.com>
---
drivers/cpufreq/cpufreq-dt.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 7c0d70e..4434e45 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -407,8 +407,13 @@ static void cpufreq_ready(struct cpufreq_policy *policy)
* thermal DT code takes care of matching them.
*/
if (of_find_property(np, "#cooling-cells", NULL)) {
- priv->cdev = of_cpufreq_cooling_register(np,
- policy->related_cpus);
+ u32 power_coefficient = 0;
+
+ 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)) {
dev_err(priv->cpu_dev,
"running cpufreq without cooling device: %ld\n",
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/3] Dynamic power model from device tree Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 18:30 +0100
[PATCH v3 2/3] cpufreq-dt: Supply power coefficient when registering cooling devices Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 18:40 +0100
Re: [PATCH v3 2/3] cpufreq-dt: Supply power coefficient when registering cooling devices Javi Merino <javi.merino@arm.com> - 2015-11-10 13:30 +0100
[PATCH v3 1/3] devicetree: bindings: Add optional dynamic-power-coefficient property Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 18:40 +0100
Re: [PATCH v3 1/3] devicetree: bindings: Add optional dynamic-power-coefficient property Rob Herring <robh@kernel.org> - 2015-11-09 18:50 +0100
Re: [PATCH v3 1/3] devicetree: bindings: Add optional dynamic-power-coefficient property Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 19:50 +0100
[PATCH v3 3/3] cpufreq: arm_big_little: Add support to register a cpufreq cooling device Punit Agrawal <punit.agrawal@arm.com> - 2015-11-09 18:40 +0100
Re: [PATCH v3 3/3] cpufreq: arm_big_little: Add support to register a cpufreq cooling device Javi Merino <javi.merino@arm.com> - 2015-11-10 13:40 +0100
Re: [PATCH v3 3/3] cpufreq: arm_big_little: Add support to register a cpufreq cooling device Viresh Kumar <viresh.kumar@linaro.org> - 2015-11-13 06:00 +0100
csiph-web