summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2023-07-21 11:11:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 15:48:56 +0300
commit7baa59f83ff365bcc9a0dd4f7877a98e62d138e1 (patch)
tree58880828beb9f1a0cdaff604f319a749190dba85 /include/linux
parent7f73098bc6104eb06f85104a512a6728c9e6eaa2 (diff)
downloadlinux-7baa59f83ff365bcc9a0dd4f7877a98e62d138e1.tar.xz
OPP: Add dev_pm_opp_find_freq_exact_indexed()
[ Upstream commit a5893928bb179d67ca1d44a8f66c990480ba541d ] The indexed version of the API is added for other floor and ceil, add the same for exact as well for completeness. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Stable-dep-of: b44b9bc7cab2 ("OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pm_opp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index a13a1705df57..23e4e4eaaa42 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -124,6 +124,10 @@ struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
unsigned long freq,
bool available);
+struct dev_pm_opp *
+dev_pm_opp_find_freq_exact_indexed(struct device *dev, unsigned long freq,
+ u32 index, bool available);
+
struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
unsigned long *freq);
@@ -268,6 +272,13 @@ static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
return ERR_PTR(-EOPNOTSUPP);
}
+static inline struct dev_pm_opp *
+dev_pm_opp_find_freq_exact_indexed(struct device *dev, unsigned long freq,
+ u32 index, bool available)
+{
+ return ERR_PTR(-EOPNOTSUPP);
+}
+
static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
unsigned long *freq)
{