diff options
author | Nishanth Menon <nm@ti.com> | 2013-09-19 17:03:50 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@rjwysocki.net> | 2013-10-25 16:33:23 -0400 |
commit | 5d4879cda67b09f086807821cf594ee079d6dfbe (patch) | |
tree | 58532256e9bff42902510175e7cb7c727a89280b /include/linux/opp.h | |
parent | 31d141e3a666269a3b6fcccddb0351caf7454240 (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.h | 50 |
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 | ||
30 | unsigned long opp_get_voltage(struct opp *opp); | 30 | unsigned long dev_pm_opp_get_voltage(struct opp *opp); |
31 | 31 | ||
32 | unsigned long opp_get_freq(struct opp *opp); | 32 | unsigned long dev_pm_opp_get_freq(struct opp *opp); |
33 | 33 | ||
34 | int opp_get_opp_count(struct device *dev); | 34 | int dev_pm_opp_get_opp_count(struct device *dev); |
35 | 35 | ||
36 | struct opp *opp_find_freq_exact(struct device *dev, unsigned long freq, | 36 | struct opp *dev_pm_opp_find_freq_exact(struct device *dev, unsigned long freq, |
37 | bool available); | 37 | bool available); |
38 | 38 | ||
39 | struct opp *opp_find_freq_floor(struct device *dev, unsigned long *freq); | 39 | struct opp *dev_pm_opp_find_freq_floor(struct device *dev, unsigned long *freq); |
40 | 40 | ||
41 | struct opp *opp_find_freq_ceil(struct device *dev, unsigned long *freq); | 41 | struct opp *dev_pm_opp_find_freq_ceil(struct device *dev, unsigned long *freq); |
42 | 42 | ||
43 | int opp_add(struct device *dev, unsigned long freq, unsigned long u_volt); | 43 | int dev_pm_opp_add(struct device *dev, unsigned long freq, |
44 | unsigned long u_volt); | ||
44 | 45 | ||
45 | int opp_enable(struct device *dev, unsigned long freq); | 46 | int dev_pm_opp_enable(struct device *dev, unsigned long freq); |
46 | 47 | ||
47 | int opp_disable(struct device *dev, unsigned long freq); | 48 | int dev_pm_opp_disable(struct device *dev, unsigned long freq); |
48 | 49 | ||
49 | struct srcu_notifier_head *opp_get_notifier(struct device *dev); | 50 | struct srcu_notifier_head *dev_pm_opp_get_notifier(struct device *dev); |
50 | #else | 51 | #else |
51 | static inline unsigned long opp_get_voltage(struct opp *opp) | 52 | static inline unsigned long dev_pm_opp_get_voltage(struct opp *opp) |
52 | { | 53 | { |
53 | return 0; | 54 | return 0; |
54 | } | 55 | } |
55 | 56 | ||
56 | static inline unsigned long opp_get_freq(struct opp *opp) | 57 | static inline unsigned long dev_pm_opp_get_freq(struct opp *opp) |
57 | { | 58 | { |
58 | return 0; | 59 | return 0; |
59 | } | 60 | } |
60 | 61 | ||
61 | static inline int opp_get_opp_count(struct device *dev) | 62 | static inline int dev_pm_opp_get_opp_count(struct device *dev) |
62 | { | 63 | { |
63 | return 0; | 64 | return 0; |
64 | } | 65 | } |
65 | 66 | ||
66 | static inline struct opp *opp_find_freq_exact(struct device *dev, | 67 | static 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 | ||
72 | static inline struct opp *opp_find_freq_floor(struct device *dev, | 73 | static 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 | ||
78 | static inline struct opp *opp_find_freq_ceil(struct device *dev, | 79 | static 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 | ||
84 | static inline int opp_add(struct device *dev, unsigned long freq, | 85 | static 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 | ||
90 | static inline int opp_enable(struct device *dev, unsigned long freq) | 91 | static inline int dev_pm_opp_enable(struct device *dev, unsigned long freq) |
91 | { | 92 | { |
92 | return 0; | 93 | return 0; |
93 | } | 94 | } |
94 | 95 | ||
95 | static inline int opp_disable(struct device *dev, unsigned long freq) | 96 | static inline int dev_pm_opp_disable(struct device *dev, unsigned long freq) |
96 | { | 97 | { |
97 | return 0; | 98 | return 0; |
98 | } | 99 | } |
99 | 100 | ||
100 | static inline struct srcu_notifier_head *opp_get_notifier(struct device *dev) | 101 | static 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) |
116 | int opp_init_cpufreq_table(struct device *dev, | 118 | int dev_pm_opp_init_cpufreq_table(struct device *dev, |
117 | struct cpufreq_frequency_table **table); | 119 | struct cpufreq_frequency_table **table); |
118 | void opp_free_cpufreq_table(struct device *dev, | 120 | void 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 |
121 | static inline int opp_init_cpufreq_table(struct device *dev, | 123 | static 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 | ||
127 | static inline | 129 | static inline |
128 | void opp_free_cpufreq_table(struct device *dev, | 130 | void 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 | } |