PM: EM: Add a flag indicating units of power values in Energy Model
authorLukasz Luba <lukasz.luba@arm.com>
Thu, 5 Nov 2020 12:50:01 +0000 (12:50 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 10 Nov 2020 19:22:00 +0000 (20:22 +0100)
commitc250d50fe2ce627ca9805d9c8ac11cbbf922a4a6
tree07ad69b1840e49d30952ae8d34e10f355c1730c3
parentf8394f232b1eab649ce2df5c5f15b0e528c92091
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>
drivers/cpufreq/scmi-cpufreq.c
drivers/opp/of.c
include/linux/energy_model.h
kernel/power/energy_model.c