summaryrefslogtreecommitdiff
path: root/include/linux/pm_opp.h
diff options
context:
space:
mode:
authorKrishna chaitanya chundru <quic_krichai@quicinc.com>2023-09-07 09:00:31 +0300
committerViresh Kumar <viresh.kumar@linaro.org>2023-10-06 10:07:34 +0300
commita0242c81bb759ef03184be8eddcc7d5bdf36cc16 (patch)
tree4d68383a98dbd8d6f35a73163f101aabb932cc22 /include/linux/pm_opp.h
parent0025ff64ffcf6bd6ece5484e7818401f77bf115f (diff)
downloadlinux-a0242c81bb759ef03184be8eddcc7d5bdf36cc16.tar.xz
OPP: Add dev_pm_opp_find_level_floor()
Add dev_pm_opp_find_level_floor(), as is done for frequency and bandwidth. Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> [ Viresh: Updated commit log and rearranged code ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/pm_opp.h')
-rw-r--r--include/linux/pm_opp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 9ad168f4cbf1..ccd97bcef269 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -156,6 +156,9 @@ struct dev_pm_opp *dev_pm_opp_find_level_exact(struct device *dev,
struct dev_pm_opp *dev_pm_opp_find_level_ceil(struct device *dev,
unsigned int *level);
+struct dev_pm_opp *dev_pm_opp_find_level_floor(struct device *dev,
+ unsigned long *level);
+
struct dev_pm_opp *dev_pm_opp_find_bw_ceil(struct device *dev,
unsigned int *bw, int index);
@@ -320,6 +323,12 @@ static inline struct dev_pm_opp *dev_pm_opp_find_level_ceil(struct device *dev,
return ERR_PTR(-EOPNOTSUPP);
}
+static inline struct dev_pm_opp *dev_pm_opp_find_level_floor(struct device *dev,
+ unsigned long *level)
+{
+ return ERR_PTR(-EOPNOTSUPP);
+}
+
static inline struct dev_pm_opp *dev_pm_opp_find_bw_ceil(struct device *dev,
unsigned int *bw, int index)
{