UPSTREAM: PM / devfreq: Add devfreq_get_devfreq_by_phandle()
[firefly-linux-kernel-4.4.55.git] / include / linux / devfreq.h
index 68030e22af3527958ac39006031dd62388228091..2f856650a74a00e7a91b96d870bdc76abd448570 100644 (file)
@@ -208,6 +208,9 @@ extern int devm_devfreq_register_opp_notifier(struct device *dev,
 extern void devm_devfreq_unregister_opp_notifier(struct device *dev,
                                                struct devfreq *devfreq);
 
+extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
+                                               int index);
+
 /**
  * devfreq_update_stats() - update the last_status pointer in struct devfreq
  * @df:                the devfreq instance whose status needs updating
@@ -307,6 +310,12 @@ static inline void devm_devfreq_unregister_opp_notifier(struct device *dev,
 {
 }
 
+static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
+                                                       int index)
+{
+       return ERR_PTR(-ENODEV);
+}
+
 static inline int devfreq_update_stats(struct devfreq *df)
 {
        return -EINVAL;