linux/drivers/opp
Stephen Boyd b3e3759ee4 opp: Don't overwrite rounded clk rate
The OPP table normally contains 'fmax' values corresponding to the
voltage or performance levels of each OPP, but we don't necessarily want
all the devices to run at fmax all the time. Running at fmax makes sense
for devices like CPU/GPU, which have a finite amount of work to do and
since a specific amount of energy is consumed at an OPP, its better to
run at the highest possible frequency for that voltage value.

On the other hand, we have IO devices which need to run at specific
frequencies only for their proper functioning, instead of maximum
possible frequency.

The OPP core currently roundup to the next possible OPP for a frequency
and select the fmax value. To support the IO devices by the OPP core,
lets do the roundup to fetch the voltage or performance state values,
but not use the OPP frequency value. Rather use the value returned by
clk_round_rate().

The current user, cpufreq, of dev_pm_opp_set_rate() already does the
rounding to the next OPP before calling this routine and it won't
have any side affects because of this change.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
[ Viresh: Massaged changelog, added comment and use temp_opp variable
	  instead ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-06-17 09:47:32 +05:30
..
core.c opp: Don't overwrite rounded clk rate 2019-06-17 09:47:32 +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 opp: no need to check return value of debugfs_create functions 2019-02-07 09:58:32 +05:30
Kconfig
Makefile PM / OPP: Add ti-opp-supply driver 2017-12-17 19:17:44 +01:00
of.c opp: Allocate genpd_virt_devs from dev_pm_opp_attach_genpd() 2019-05-20 12:04:45 +05:30
opp.h Power management updates for 5.1-rc1 2019-03-06 12:59:46 -08:00
ti-opp-supply.c opp: ti-opp-supply: Fix platform_no_drv_owner.cocci warnings 2018-11-22 11:46:02 +05:30