diff options
Diffstat (limited to 'include/linux/opp.h')
-rw-r--r-- | include/linux/opp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/opp.h b/include/linux/opp.h index 7020e9736fc5..87a9208f8aec 100644 --- a/include/linux/opp.h +++ b/include/linux/opp.h | |||
@@ -16,9 +16,14 @@ | |||
16 | 16 | ||
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/cpufreq.h> | 18 | #include <linux/cpufreq.h> |
19 | #include <linux/notifier.h> | ||
19 | 20 | ||
20 | struct opp; | 21 | struct opp; |
21 | 22 | ||
23 | enum opp_event { | ||
24 | OPP_EVENT_ADD, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE, | ||
25 | }; | ||
26 | |||
22 | #if defined(CONFIG_PM_OPP) | 27 | #if defined(CONFIG_PM_OPP) |
23 | 28 | ||
24 | unsigned long opp_get_voltage(struct opp *opp); | 29 | unsigned long opp_get_voltage(struct opp *opp); |
@@ -40,6 +45,8 @@ int opp_enable(struct device *dev, unsigned long freq); | |||
40 | 45 | ||
41 | int opp_disable(struct device *dev, unsigned long freq); | 46 | int opp_disable(struct device *dev, unsigned long freq); |
42 | 47 | ||
48 | struct srcu_notifier_head *opp_get_notifier(struct device *dev); | ||
49 | |||
43 | #else | 50 | #else |
44 | static inline unsigned long opp_get_voltage(struct opp *opp) | 51 | static inline unsigned long opp_get_voltage(struct opp *opp) |
45 | { | 52 | { |
@@ -89,6 +96,11 @@ static inline int opp_disable(struct device *dev, unsigned long freq) | |||
89 | { | 96 | { |
90 | return 0; | 97 | return 0; |
91 | } | 98 | } |
99 | |||
100 | struct srcu_notifier_head *opp_get_notifier(struct device *dev) | ||
101 | { | ||
102 | return ERR_PTR(-EINVAL); | ||
103 | } | ||
92 | #endif /* CONFIG_PM */ | 104 | #endif /* CONFIG_PM */ |
93 | 105 | ||
94 | #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) | 106 | #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) |