PM / OPP: get the voltage for all OPPs
authorJavi Merino <javi.merino@arm.com>
Thu, 10 Sep 2015 17:09:29 +0000 (18:09 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 30 Oct 2015 17:19:42 +0000 (10:19 -0700)
commitd6d007429f21626ad0f9cf96589151e0746f5648
treedfe1fdf119ab1ecb61df53e62ed270bd13fa0a73
parentb840b6e65cbe2b84ec398bb286d121a9eb2597ee
PM / OPP: get the voltage for all OPPs

The OPP library is now used for power models to calculate the power
that a device would consume at a specific OPP.  To do that, we use a
simple power model which takes frequency and voltage as inputs.  We get
the voltage and frequency from the OPP library.

The devfreq cooling device for the thermal framework controls
temperature by disabling OPPs.  The power model needs to calculate the
power that would be consumed if we reenabled the OPP.  Therefore, let
dev_pm_opp_get_voltage() work for disabled OPPs.

Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/base/power/opp.c