OPP: Introduce dev_pm_opp_find_freq_{ceil/floor}_indexed() APIs
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 20 Jul 2023 05:40:52 +0000 (11:10 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 21 Jul 2023 09:38:27 +0000 (15:08 +0530)
commit142e17c1c2b48e3fb4f024e62ab6dee18f268694
tree7a106123a9417aceab9869d77840b426fdbcbd27
parent754833b3194c30dad5af0145e25192a8e29521ab
OPP: Introduce dev_pm_opp_find_freq_{ceil/floor}_indexed() APIs

In the case of devices with multiple clocks, drivers need to specify the
clock index for the OPP framework to find the OPP corresponding to the
floor/ceil of the supplied frequency. So let's introduce the two new APIs
accepting the clock index as an argument.

These APIs use the exising _find_key_ceil() helper by supplying the clock
index to it.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[ Viresh: Rearranged definitions in pm_opp.h ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
include/linux/pm_opp.h