linux/drivers/opp
Stephan Gerhold 2c59138c22 opp: Set required OPPs in reverse order when scaling down
The OPP core already has well-defined semantics to ensure required
OPPs/regulators are set before/after the frequency change, depending
on if we scale up or down.

Similar requirements might exist for the order of required OPPs
when multiple power domains need to be scaled for a frequency change.

For example, on Qualcomm platforms using CPR (Core Power Reduction),
we need to scale the VDDMX and CPR power domain. When scaling up,
MX should be scaled up before CPR. When scaling down, CPR should be
scaled down before MX.

In general, if there are multiple "required-opps" in the device tree
I would expect that the order is either irrelevant, or there is some
dependency between the power domains. In that case, the power domains
should be scaled down in reverse order.

This commit updates _set_required_opps() to set required OPPs in
reverse order when scaling down.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
[ Viresh: Fix rebase conflict and minor rearrangement of the code ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-09-16 14:02:33 +05:30
..
core.c opp: Set required OPPs in reverse order when scaling down 2020-09-16 14:02:33 +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 Merge branch 'opp/defer-probe' into HEAD 2020-09-16 14:02:23 +05:30
opp.h opp: Remove _dev_pm_opp_find_and_remove_table() wrapper 2020-08-24 17:04:37 +05:30
ti-opp-supply.c opp: ti-opp-supply: Replace HTTP links with HTTPS ones 2020-07-24 08:05:54 +05:30