Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1189973
| From | Punit Agrawal <punit.agrawal@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/9] cpufreq-dt: Supply power coefficient when registering cooling devices |
| Date | 2015-07-22 16:10 +0200 |
| Message-ID | <pP2SC-Cp-19@gated-at.bofh.it> (permalink) |
| References | <pP2SB-Cp-3@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>
Cc: 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 528a82bf..1d1f61a 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -344,8 +344,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.1.4
--
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 0/9] Platform support for thermal management on Junoe Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
[PATCH 4/9] Documentation: add DT bindings for ARM SCPI sensors Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
[PATCH 9/9] arm64: dts: Create SoC thermal zone for Juno Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
[PATCH 2/9] cpufreq-dt: Supply power coefficient when registering cooling devices Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
[PATCH 8/9] arm64: dts: Add sensor node to Juno dt Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
[PATCH 7/9] hwmon: Support registration of thermal zones for SCP temperature sensors Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
Re: [PATCH 7/9] hwmon: Support registration of thermal zones for SCP temperature sensors Guenter Roeck <linux@roeck-us.net> - 2015-07-22 18:00 +0200
Re: [PATCH 7/9] hwmon: Support registration of thermal zones for SCP temperature sensors Punit Agrawal <punit.agrawal@arm.com> - 2015-07-24 16:20 +0200
[PATCH 6/9] hwmon: Support sensors exported via ARM SCP interface Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
Re: [PATCH 6/9] hwmon: Support sensors exported via ARM SCP interface Guenter Roeck <linux@roeck-us.net> - 2015-07-22 17:40 +0200
Re: [PATCH 6/9] hwmon: Support sensors exported via ARM SCP interface Punit Agrawal <punit.agrawal@arm.com> - 2015-07-24 16:10 +0200
[PATCH 5/9] firmware: arm_scpi: Extend to support sensors Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
[PATCH 1/9] devicetree: bindings: Add optional dynamic-power-coefficient property Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
[PATCH 3/9] cpufreq: arm_big_little: Add support to register a cpufreq cooling device Punit Agrawal <punit.agrawal@arm.com> - 2015-07-22 16:10 +0200
Re: [PATCH 0/9] Platform support for thermal management on Junoe Punit Agrawal <punit.agrawal@arm.com> - 2015-07-24 16:20 +0200
Re: [PATCH 0/9] Platform support for thermal management on Junoe Viresh Kumar <viresh.kumar@linaro.org> - 2015-07-25 03:30 +0200
csiph-web