Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1357880 > unrolled thread
| Started by | Dawei Chien <dawei.chien@mediatek.com> |
|---|---|
| First post | 2016-03-15 09:20 +0100 |
| Last post | 2016-03-15 09:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RESEND][PATCH 1/3] thermal: mediatek: Add cpu dynamic power cooling model. Dawei Chien <dawei.chien@mediatek.com> - 2016-03-15 09:20 +0100
| From | Dawei Chien <dawei.chien@mediatek.com> |
|---|---|
| Date | 2016-03-15 09:20 +0100 |
| Subject | [RESEND][PATCH 1/3] thermal: mediatek: Add cpu dynamic power cooling model. |
| Message-ID | <rcSmR-7Sw-1@gated-at.bofh.it> |
MT8173 cpufreq driver select of_cpufreq_power_cooling_register registering
cooling devices with dynamic power coefficient.
Signed-off-by: Dawei Chien <dawei.chien@mediatek.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
This patch is base on patchset:
https://lkml.org/lkml/2015/11/17/251
---
drivers/cpufreq/mt8173-cpufreq.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c
index 1efba34..d8ad406 100644
--- a/drivers/cpufreq/mt8173-cpufreq.c
+++ b/drivers/cpufreq/mt8173-cpufreq.c
@@ -309,17 +309,24 @@ static int mtk_cpufreq_set_target(struct cpufreq_policy *policy,
return 0;
}
+#define DYNAMIC_POWER "dynamic-power-coefficient"
+
static void mtk_cpufreq_ready(struct cpufreq_policy *policy)
{
struct mtk_cpu_dvfs_info *info = policy->driver_data;
struct device_node *np = of_node_get(info->cpu_dev->of_node);
+ u32 capacitance = 0;
if (WARN_ON(!np))
return;
if (of_find_property(np, "#cooling-cells", NULL)) {
- info->cdev = of_cpufreq_cooling_register(np,
- policy->related_cpus);
+ of_property_read_u32(np, DYNAMIC_POWER, &capacitance);
+
+ info->cdev = of_cpufreq_power_cooling_register(np,
+ policy->related_cpus,
+ capacitance,
+ NULL);
if (IS_ERR(info->cdev)) {
dev_err(info->cpu_dev,
--
1.7.9.5
Back to top | Article view | linux.kernel
csiph-web