aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/opp.h
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2013-09-19 17:03:50 -0400
committerRafael J. Wysocki <rjw@rjwysocki.net>2013-10-25 16:33:23 -0400
commit5d4879cda67b09f086807821cf594ee079d6dfbe (patch)
tree58532256e9bff42902510175e7cb7c727a89280b /include/linux/opp.h
parent31d141e3a666269a3b6fcccddb0351caf7454240 (diff)
PM / OPP: rename functions to dev_pm_opp*
Since Operating Performance Points (OPP) functions are specific to device specific power management, be specific and rename opp_* accessors in OPP library with dev_pm_opp_* equivalent. Affected functions are: opp_get_voltage opp_get_freq opp_get_opp_count opp_find_freq_exact opp_find_freq_floor opp_find_freq_ceil opp_add opp_enable opp_disable opp_get_notifier opp_init_cpufreq_table opp_free_cpufreq_table Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/opp.h')
-rw-r--r--include/linux/opp.h50
1 files changed, 26 insertions, 24 deletions
diff --git a/include/linux/opp.h b/include/linux/opp.h
index 3aca2b8def33..2066ae5880c6 100644
--- a/include/linux/opp.h
+++ b/include/linux/opp.h
@@ -27,77 +27,79 @@ enum opp_event {
27 27
28#if defined(CONFIG_PM_OPP) 28#if defined(CONFIG_PM_OPP)
29 29
30unsigned long opp_get_voltage(struct opp *opp); 30unsigned long dev_pm_opp_get_voltage(struct opp *opp);
31 31
32unsigned long opp_get_freq(struct opp *opp); 32unsigned long dev_pm_opp_get_freq(struct opp *opp);
33 33
34int opp_get_opp_count(struct device *dev); 34int dev_pm_opp_get_opp_count(struct device *dev);
35 35
36struct opp *opp_find_freq_exact(struct device *dev, unsigned long freq, 36struct opp *dev_pm_opp_find_freq_exact(struct device *dev, unsigned long freq,
37 bool available); 37 bool available);
38 38
39struct opp *opp_find_freq_floor(struct device *dev, unsigned long *freq); 39struct opp *dev_pm_opp_find_freq_floor(struct device *dev, unsigned long *freq);
40 40
41struct opp *opp_find_freq_ceil(struct device *dev, unsigned long *freq); 41struct opp *dev_pm_opp_find_freq_ceil(struct device *dev, unsigned long *freq);
42 42
43int opp_add(struct device *dev, unsigned long freq, unsigned long u_volt); 43int dev_pm_opp_add(struct device *dev, unsigned long freq,
44 unsigned long u_volt);
44 45
45int opp_enable(struct device *dev, unsigned long freq); 46int dev_pm_opp_enable(struct device *dev, unsigned long freq);
46 47
47int opp_disable(struct device *dev, unsigned long freq); 48int dev_pm_opp_disable(struct device *dev, unsigned long freq);
48 49
49struct srcu_notifier_head *opp_get_notifier(struct device *dev); 50struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev);
50#else 51#else
51static inline unsigned long opp_get_voltage(struct opp *opp) 52static inline unsigned long dev_pm_opp_get_voltage(struct opp *opp)
52{ 53{
53 return 0; 54 return 0;
54} 55}
55 56
56static inline unsigned long opp_get_freq(struct opp *opp) 57static inline unsigned long dev_pm_opp_get_freq(struct opp *opp)
57{ 58{
58 return 0; 59 return 0;
59} 60}
60 61
61static inline int opp_get_opp_count(struct device *dev) 62static inline int dev_pm_opp_get_opp_count(struct device *dev)
62{ 63{
63 return 0; 64 return 0;
64} 65}
65 66
66static inline struct opp *opp_find_freq_exact(struct device *dev, 67static inline struct opp *dev_pm_opp_find_freq_exact(struct device *dev,
67 unsigned long freq, bool available) 68 unsigned long freq, bool available)
68{ 69{
69 return ERR_PTR(-EINVAL); 70 return ERR_PTR(-EINVAL);
70} 71}
71 72
72static inline struct opp *opp_find_freq_floor(struct device *dev, 73static inline struct opp *dev_pm_opp_find_freq_floor(struct device *dev,
73 unsigned long *freq) 74 unsigned long *freq)
74{ 75{
75 return ERR_PTR(-EINVAL); 76 return ERR_PTR(-EINVAL);
76} 77}
77 78
78static inline struct opp *opp_find_freq_ceil(struct device *dev, 79static inline struct opp *dev_pm_opp_find_freq_ceil(struct device *dev,
79 unsigned long *freq) 80 unsigned long *freq)
80{ 81{
81 return ERR_PTR(-EINVAL); 82 return ERR_PTR(-EINVAL);
82} 83}
83 84
84static inline int opp_add(struct device *dev, unsigned long freq, 85static inline int dev_pm_opp_add(struct device *dev, unsigned long freq,
85 unsigned long u_volt) 86 unsigned long u_volt)
86{ 87{
87 return -EINVAL; 88 return -EINVAL;
88} 89}
89 90
90static inline int opp_enable(struct device *dev, unsigned long freq) 91static inline int dev_pm_opp_enable(struct device *dev, unsigned long freq)
91{ 92{
92 return 0; 93 return 0;
93} 94}
94 95
95static inline int opp_disable(struct device *dev, unsigned long freq) 96static inline int dev_pm_opp_disable(struct device *dev, unsigned long freq)
96{ 97{
97 return 0; 98 return 0;
98} 99}
99 100
100static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev) 101static inline struct srcu_notifier_head *dev_pm_opp_get_notifier(
102 struct device *dev)
101{ 103{
102 return ERR_PTR(-EINVAL); 104 return ERR_PTR(-EINVAL);
103} 105}
@@ -113,19 +115,19 @@ static inline int of_init_opp_table(struct device *dev)
113#endif 115#endif
114 116
115#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) 117#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP)
116int opp_init_cpufreq_table(struct device *dev, 118int dev_pm_opp_init_cpufreq_table(struct device *dev,
117 struct cpufreq_frequency_table **table); 119 struct cpufreq_frequency_table **table);
118void opp_free_cpufreq_table(struct device *dev, 120void dev_pm_opp_free_cpufreq_table(struct device *dev,
119 struct cpufreq_frequency_table **table); 121 struct cpufreq_frequency_table **table);
120#else 122#else
121static inline int opp_init_cpufreq_table(struct device *dev, 123static inline int dev_pm_opp_init_cpufreq_table(struct device *dev,
122 struct cpufreq_frequency_table **table) 124 struct cpufreq_frequency_table **table)
123{ 125{
124 return -EINVAL; 126 return -EINVAL;
125} 127}
126 128
127static inline 129static inline
128void opp_free_cpufreq_table(struct device *dev, 130void dev_pm_opp_free_cpufreq_table(struct device *dev,
129 struct cpufreq_frequency_table **table) 131 struct cpufreq_frequency_table **table)
130{ 132{
131} 133}