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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -102,6 +102,8 @@ struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, · 101 unmodified lines | |||
| 102 | 102 | ||
| 103 | struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, | 103 | struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, |
| 104 | unsigned long *freq); | 104 | unsigned long *freq); |
| 105 | struct dev_pm_opp *dev_pm_opp_find_freq_ceil_by_volt(struct device *dev, | ||
| 106 | unsigned long u_volt); | ||
| 105 | 107 | ||
| 106 | struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, | 108 | struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, |
| 107 | unsigned long *freq); | 109 | unsigned long *freq); |
| @@ -207,6 +209,12 @@ static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, · 99 unmodified lines | |||
| 207 | return ERR_PTR(-ENOTSUPP); | 209 | return ERR_PTR(-ENOTSUPP); |
| 208 | } | 210 | } |
| 209 | 211 | ||
| 212 | static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil_by_volt(struct device *dev, | ||
| 213 | unsigned long u_volt) | ||
| 214 | { | ||
| 215 | return ERR_PTR(-ENOTSUPP); | ||
| 216 | } | ||
| 217 | |||
| 210 | static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, | 218 | static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, |
| 211 | unsigned long *freq) | 219 | unsigned long *freq) |
| 212 | { | 220 | { |