linux-stable/drivers/opp
Jonathan Marek de04241ab8 opp: Don't skip freq update for different frequency
We skip the OPP update if the current and target OPPs are same. This is
fine for the devices that don't support frequency but may cause issues
for the ones that need to program frequency.

An OPP entry doesn't really signify a single operating frequency but
rather the highest frequency at which the other properties of the OPP
entry apply. And we may reach here with different frequency values,
while all of them would point to the same OPP entry in the OPP table.

We just need to update the clock frequency in that case, though in order
to not add special exit points we reuse the code flow from a normal
path.

While at it, rearrange the conditionals in the 'if' statement to check
'enabled' flag at the end.

Fixes: 81c4d8a3c4 ("opp: Keep track of currently programmed OPP")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
[ Viresh: Improved commit log and subject, rename current_freq as
	  current_rate, document it, remove local variable and rearrange
	  code. ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-02-18 12:31:08 +05:30
..
core.c opp: Don't skip freq update for different frequency 2021-02-18 12:31:08 +05:30
cpu.c opp: Remove _dev_pm_opp_find_and_remove_table() wrapper 2020-08-24 17:04:37 +05:30
debugfs.c opp: Expose bandwidth information via debugfs 2020-05-29 10:15:12 +05:30
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
of.c opp: Allow lazy-linking of required-opps 2021-02-02 10:30:53 +05:30
opp.h opp: Don't skip freq update for different frequency 2021-02-18 12:31:08 +05:30
ti-opp-supply.c opp: ti-opp-supply: Replace HTTP links with HTTPS ones 2020-07-24 08:05:54 +05:30