aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_opp.h
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@codeaurora.org>2019-01-10 09:32:02 +0530
committerAndy Gross <andy.gross@linaro.org>2019-01-22 15:06:11 -0600
commit5b93ac542301026eff8954589cf59f801d03db3e (patch)
tree281b92c16dd14af7f10be2edbafb2a6bf42017f9 /include/linux/pm_opp.h
parentdt-bindings: opp: Introduce opp-level bindings (diff)
downloadlinux-dev-5b93ac542301026eff8954589cf59f801d03db3e.tar.xz
linux-dev-5b93ac542301026eff8954589cf59f801d03db3e.zip
OPP: Add support for parsing the 'opp-level' property
Now that the OPP bindings are updated to include an optional 'opp-level' property, add support to parse it from device tree and store it as part of dev_pm_opp structure. Also add and export an helper 'dev_pm_opp_get_level()' that can be used to get the level value read from device tree when present. Reviewed-by: Stephen Boyd <swboyd@chromium.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@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 0a2a88e5a383..473d2c7516f0 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -86,6 +86,8 @@ unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp);
unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
+unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp);
+
bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
int dev_pm_opp_get_opp_count(struct device *dev);
@@ -157,6 +159,11 @@ static inline unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp)
return 0;
}
+static inline unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp)
+{
+ return 0;
+}
+
static inline bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp)
{
return false;