Skip to contentSkip to conversation

cpufreq: mediatek: Register an Energy Model

PATCH Applied Matthias Kaehlcke 2 participants 2 messages Feb 6, 2019 – Feb 7, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 cpufreq: mediatek: Register an Energy Model

Try and register an Energy Model from mediatek-cpufreq to allow interested subsystems like the task scheduler to use the provided information.

---
Changes in v2:
- register the EM after setting the cpumask

---
 drivers/cpufreq/mediatek-cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/cpufreq/mediatek-cpufreq.c +2 -0
index eb8920d398181..5250df762814e 100644
@@ -465,6 +465,8 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy)
 	policy->driver_data = info;
 	policy->clk = info->cpu_clk;
 
+	dev_pm_opp_of_register_em(policy->cpus);
+
 	return 0;
 }
 
Signature · 1 line
2.20.1.611.gfbb209baf1-goog
maintainer Applied
#1 lore raw
Quoted 17 lines · Matthias Kaehlcke

Try and register an Energy Model from mediatek-cpufreq to allow interested subsystems like the task scheduler to use the provided information.

---
Changes in v2:
- register the EM after setting the cpumask

---
 drivers/cpufreq/mediatek-cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/cpufreq/mediatek-cpufreq.c +0 -0
index eb8920d398181..5250df762814e 100644

drivers/cpufreq/mediatek-cpufreq.c static int mtk_cpufreq_init(struct cpufreq_policy *policy) · line 471

Quoted 7 lines
drivers/cpufreq/mediatek-cpufreq.c +2 -0
@@ -465,6 +465,8 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy)
 	policy->driver_data = info;
 	policy->clk = info->cpu_clk;
 
+	dev_pm_opp_of_register_em(policy->cpus);
+
 	return 0;
 }

Applied it after rebasing over the change in cpufreq/arm/linux-next branch. Thanks.

Signature · 1 line
viresh