aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/devfreq.h
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2015-11-10 06:31:07 -0500
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-05-02 22:20:06 -0400
commit8f510aeb223b26c4ffbece9fa92e4befea470f57 (patch)
treebf4fb4bad488510fab1baf43cbb42df08e0e2b7e /include/linux/devfreq.h
parent72c160bda1dbe75d532502374a6cb6be28990093 (diff)
PM / devfreq: Add devfreq_get_devfreq_by_phandle()
This patch adds the new devfreq_get_devfreq_by_phandle() OF helper function which can find the instance of devfreq device by using phandle ("devfreq"). Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board] Tested-by: Markus Reichl <m.reichl@fivetechno.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'include/linux/devfreq.h')
-rw-r--r--include/linux/devfreq.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index 6fa02a20eb63..aa0b8424ebc3 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -208,6 +208,9 @@ extern int devm_devfreq_register_opp_notifier(struct device *dev,
208extern void devm_devfreq_unregister_opp_notifier(struct device *dev, 208extern void devm_devfreq_unregister_opp_notifier(struct device *dev,
209 struct devfreq *devfreq); 209 struct devfreq *devfreq);
210 210
211extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
212 int index);
213
211/** 214/**
212 * devfreq_update_stats() - update the last_status pointer in struct devfreq 215 * devfreq_update_stats() - update the last_status pointer in struct devfreq
213 * @df: the devfreq instance whose status needs updating 216 * @df: the devfreq instance whose status needs updating
@@ -307,6 +310,12 @@ static inline void devm_devfreq_unregister_opp_notifier(struct device *dev,
307{ 310{
308} 311}
309 312
313static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
314 int index)
315{
316 return ERR_PTR(-ENODEV);
317}
318
310static inline int devfreq_update_stats(struct devfreq *df) 319static inline int devfreq_update_stats(struct devfreq *df)
311{ 320{
312 return -EINVAL; 321 return -EINVAL;