OPP: Make dev_pm_opp_set_opp() independent of frequency
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 3 Jun 2022 09:31:30 +0000 (15:01 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 8 Jul 2022 05:57:51 +0000 (11:27 +0530)
commit1efae8d2e7775b04656eb18d0a044fbd412dab3c
tree3ca3acb0a5932abbd62ac50ff72f6a97f059d0f8
parent8bdac14b0cd56d9578d3112375ed8b23884c1a69
OPP: Make dev_pm_opp_set_opp() independent of frequency

dev_pm_opp_set_opp() can be called for any device, it may or may not
have a frequency value associated with it.

If a frequency value isn't available, we pass 0 to _set_opp(). Make it
optional instead by making _set_opp() accept a pointer instead, as the
frequency value is anyway available in the OPP. This makes
dev_pm_opp_set_opp() and _set_opp() completely independent of any
special key value.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
drivers/opp/opp.h