diff options
author | Andrew-sh.Cheng <andrew-sh.cheng@mediatek.com> | 2019-03-29 14:46:10 +0800 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2019-04-10 12:13:31 +0530 |
commit | 2f36bde0fc8f1ab79d54bd2caa7c1cf874fd2206 (patch) | |
tree | a48df1456492be0d18de709395bfca06fdc9d261 /include/linux/pm_opp.h | |
parent | 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff) |
OPP: Introduce dev_pm_opp_find_freq_ceil_by_volt()
This patch introduces a new helper routine in the OPP core, which
returns the OPP with the highest frequency which has voltage less than
or equal to the target voltage passed to the helper.
Signed-off-by: Andrew-sh.Cheng <andrew-sh.cheng@mediatek.com>
[ Viresh: Massaged the commit log and renamed the helper with some
cleanups. ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/pm_opp.h')
-rw-r--r-- | include/linux/pm_opp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 24c757a32a7b..b150fe97ce5a 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -102,6 +102,8 @@ struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, unsigned long *freq); +struct dev_pm_opp *dev_pm_opp_find_freq_ceil_by_volt(struct device *dev, + unsigned long u_volt); struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, unsigned long *freq); @@ -207,6 +209,12 @@ static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, return ERR_PTR(-ENOTSUPP); } +static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil_by_volt(struct device *dev, + unsigned long u_volt) +{ + return ERR_PTR(-ENOTSUPP); +} + static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, unsigned long *freq) { |