summaryrefslogtreecommitdiff
path: root/include/linux/pm_opp.h
diff options
context:
space:
mode:
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2023-07-20 08:40:53 +0300
committerViresh Kumar <viresh.kumar@linaro.org>2023-07-24 10:52:39 +0300
commit5f756d03e2c7db63c1df7148d7b1739f29ff1532 (patch)
tree3505828ed917814c82989185a306006135f6680f /include/linux/pm_opp.h
parent142e17c1c2b48e3fb4f024e62ab6dee18f268694 (diff)
downloadlinux-5f756d03e2c7db63c1df7148d7b1739f29ff1532.tar.xz
OPP: Introduce dev_pm_opp_get_freq_indexed() API
In the case of devices with multiple clocks, drivers need to specify the frequency index for the OPP framework to get the specific frequency within the required OPP. So let's introduce the dev_pm_opp_get_freq_indexed() API accepting the frequency index as an argument. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> [ Viresh: Fixed potential access to NULL opp pointer ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/pm_opp.h')
-rw-r--r--include/linux/pm_opp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 2617f2c51f29..a13a1705df57 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -105,6 +105,8 @@ unsigned long dev_pm_opp_get_power(struct dev_pm_opp *opp);
unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
+unsigned long dev_pm_opp_get_freq_indexed(struct dev_pm_opp *opp, u32 index);
+
unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp);
unsigned int dev_pm_opp_get_required_pstate(struct dev_pm_opp *opp,
@@ -213,6 +215,11 @@ static inline unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp)
return 0;
}
+static inline unsigned long dev_pm_opp_get_freq_indexed(struct dev_pm_opp *opp, u32 index)
+{
+ return 0;
+}
+
static inline unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp)
{
return 0;