summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2020-11-05 13:50:01 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-11-10 20:22:00 +0100
commitc250d50fe2ce627ca9805d9c8ac11cbbf922a4a6 (patch)
tree07ad69b1840e49d30952ae8d34e10f355c1730c3 /drivers
parentLinux 5.10-rc3 (diff)
downloadlinux-c250d50fe2ce627ca9805d9c8ac11cbbf922a4a6.tar.xz
linux-c250d50fe2ce627ca9805d9c8ac11cbbf922a4a6.zip
PM: EM: Add a flag indicating units of power values in Energy Model
There are different platforms and devices which might use different scale for the power values. Kernel sub-systems might need to check if all Energy Model (EM) devices are using the same scale. Address that issue and store the information inside EM for each device. Thanks to that they can be easily compared and proper action triggered. Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Quentin Perret <qperret@google.com> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/scmi-cpufreq.c3
-rw-r--r--drivers/opp/of.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index e855e8612a67..3714a4cd07fa 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -188,7 +188,8 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
policy->fast_switch_possible =
handle->perf_ops->fast_switch_possible(handle, cpu_dev);
- em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus);
+ em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus,
+ false);
return 0;
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index 9faeb83e4b32..16f39e2127a5 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -1335,7 +1335,7 @@ int dev_pm_opp_of_register_em(struct device *dev, struct cpumask *cpus)
goto failed;
}
- ret = em_dev_register_perf_domain(dev, nr_opp, &em_cb, cpus);
+ ret = em_dev_register_perf_domain(dev, nr_opp, &em_cb, cpus, true);
if (ret)
goto failed;