linux/drivers/opp
Quentin Perret a4f342b960 PM / OPP: Introduce a power estimation helper
The Energy Model (EM) framework provides an API to let drivers register
the active power of CPUs. The drivers are expected to provide a callback
method which estimates the power consumed by a CPU at each available
performance levels. How exactly this should be implemented, however,
depends on the platform.

On some systems, PM_OPP knows the voltage and frequency at which CPUs
can run. When coupled with the CPU 'capacitance' (as provided by the
'dynamic-power-coefficient' devicetree binding), it is possible to
estimate the dynamic power consumption of a CPU as P = C * V^2 * f, with
C its capacitance and V and f respectively the voltage and frequency of
the OPP. The Intelligent Power Allocator (IPA) thermal governor already
implements that estimation method, in the thermal framework.

However, this power estimation method can be applied to any platform
where all the parameters are known (C, V and f), and not only those
suffering thermal issues. As such, the code implementing this feature
can be re-used to also populate the EM framework now used by EAS.

As a first step, introduce in PM_OPP a helper function which CPUFreq
drivers can use to register into the EM framework. This duplicates the
power estimation done in IPA until it can be migrated to using the EM
framework. This will be done later, once the EM framework has support
for at least all platforms currently supported by IPA.

Signed-off-by: Quentin Perret <quentin.perret@arm.com>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07 09:55:11 +05:30
..
core.c PM / OPP: Remove unused parameter of _generic_set_opp_clk_only() 2019-02-07 09:55:11 +05:30
cpu.c OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table() 2018-09-19 14:56:45 -07:00
debugfs.c PM / OPP: "opp-hz" is optional for power domains 2018-05-09 10:15:18 +05:30
Kconfig
Makefile PM / OPP: Add ti-opp-supply driver 2017-12-17 19:17:44 +01:00
of.c PM / OPP: Introduce a power estimation helper 2019-02-07 09:55:11 +05:30
opp.h Merge branch 'opp/genpd/propagation' into opp/linux-next 2018-12-14 16:28:52 +05:30
ti-opp-supply.c opp: ti-opp-supply: Fix platform_no_drv_owner.cocci warnings 2018-11-22 11:46:02 +05:30