diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-17 14:25:33 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-17 14:25:33 -0400 |
commit | 079d364b042afbe811c4bb0cb57fcbf4f1cfab6d (patch) | |
tree | e31d0b06bc05cfe5bdabb30c8249489226153860 /include | |
parent | 8592013bbd3858e9427ea2c5fb23a2c983b4dcaa (diff) | |
parent | b3d3b9fb6016e6eacd3ae49fb786806d00c43e7b (diff) |
Merge branch 'pm-domains'
* pm-domains:
PM / Domains: Fix compilation warning related to genpd_start_dev_no_timing()
PM / Domains: Operations related to cpuidle using domain names
PM / Domains: Document cpuidle-related functions and change their names
PM / Domains: Add power-on function using names to identify domains
PM / Domains: Make it possible to use names when adding subdomains
PM / Domains: Make it possible to use domain names when adding devices
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pm_domain.h | 73 |
1 files changed, 56 insertions, 17 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 08adf8e5a80e..7c1d252b20c0 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
@@ -138,35 +138,32 @@ extern int __pm_genpd_of_add_device(struct device_node *genpd_node, | |||
138 | struct device *dev, | 138 | struct device *dev, |
139 | struct gpd_timing_data *td); | 139 | struct gpd_timing_data *td); |
140 | 140 | ||
141 | static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, | 141 | extern int __pm_genpd_name_add_device(const char *domain_name, |
142 | struct device *dev) | 142 | struct device *dev, |
143 | { | 143 | struct gpd_timing_data *td); |
144 | return __pm_genpd_add_device(genpd, dev, NULL); | ||
145 | } | ||
146 | |||
147 | static inline int pm_genpd_of_add_device(struct device_node *genpd_node, | ||
148 | struct device *dev) | ||
149 | { | ||
150 | return __pm_genpd_of_add_device(genpd_node, dev, NULL); | ||
151 | } | ||
152 | 144 | ||
153 | extern int pm_genpd_remove_device(struct generic_pm_domain *genpd, | 145 | extern int pm_genpd_remove_device(struct generic_pm_domain *genpd, |
154 | struct device *dev); | 146 | struct device *dev); |
155 | extern void pm_genpd_dev_need_restore(struct device *dev, bool val); | 147 | extern void pm_genpd_dev_need_restore(struct device *dev, bool val); |
156 | extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | 148 | extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, |
157 | struct generic_pm_domain *new_subdomain); | 149 | struct generic_pm_domain *new_subdomain); |
150 | extern int pm_genpd_add_subdomain_names(const char *master_name, | ||
151 | const char *subdomain_name); | ||
158 | extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, | 152 | extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, |
159 | struct generic_pm_domain *target); | 153 | struct generic_pm_domain *target); |
160 | extern int pm_genpd_add_callbacks(struct device *dev, | 154 | extern int pm_genpd_add_callbacks(struct device *dev, |
161 | struct gpd_dev_ops *ops, | 155 | struct gpd_dev_ops *ops, |
162 | struct gpd_timing_data *td); | 156 | struct gpd_timing_data *td); |
163 | extern int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td); | 157 | extern int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td); |
164 | extern int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state); | 158 | extern int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state); |
165 | extern int genpd_detach_cpuidle(struct generic_pm_domain *genpd); | 159 | extern int pm_genpd_name_attach_cpuidle(const char *name, int state); |
160 | extern int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd); | ||
161 | extern int pm_genpd_name_detach_cpuidle(const char *name); | ||
166 | extern void pm_genpd_init(struct generic_pm_domain *genpd, | 162 | extern void pm_genpd_init(struct generic_pm_domain *genpd, |
167 | struct dev_power_governor *gov, bool is_off); | 163 | struct dev_power_governor *gov, bool is_off); |
168 | 164 | ||
169 | extern int pm_genpd_poweron(struct generic_pm_domain *genpd); | 165 | extern int pm_genpd_poweron(struct generic_pm_domain *genpd); |
166 | extern int pm_genpd_name_poweron(const char *domain_name); | ||
170 | 167 | ||
171 | extern bool default_stop_ok(struct device *dev); | 168 | extern bool default_stop_ok(struct device *dev); |
172 | 169 | ||
@@ -187,8 +184,15 @@ static inline int __pm_genpd_add_device(struct generic_pm_domain *genpd, | |||
187 | { | 184 | { |
188 | return -ENOSYS; | 185 | return -ENOSYS; |
189 | } | 186 | } |
190 | static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, | 187 | static inline int __pm_genpd_of_add_device(struct device_node *genpd_node, |
191 | struct device *dev) | 188 | struct device *dev, |
189 | struct gpd_timing_data *td) | ||
190 | { | ||
191 | return -ENOSYS; | ||
192 | } | ||
193 | static inline int __pm_genpd_name_add_device(const char *domain_name, | ||
194 | struct device *dev, | ||
195 | struct gpd_timing_data *td) | ||
192 | { | 196 | { |
193 | return -ENOSYS; | 197 | return -ENOSYS; |
194 | } | 198 | } |
@@ -203,6 +207,11 @@ static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | |||
203 | { | 207 | { |
204 | return -ENOSYS; | 208 | return -ENOSYS; |
205 | } | 209 | } |
210 | static inline int pm_genpd_add_subdomain_names(const char *master_name, | ||
211 | const char *subdomain_name) | ||
212 | { | ||
213 | return -ENOSYS; | ||
214 | } | ||
206 | static inline int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, | 215 | static inline int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, |
207 | struct generic_pm_domain *target) | 216 | struct generic_pm_domain *target) |
208 | { | 217 | { |
@@ -218,11 +227,19 @@ static inline int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td) | |||
218 | { | 227 | { |
219 | return -ENOSYS; | 228 | return -ENOSYS; |
220 | } | 229 | } |
221 | static inline int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int st) | 230 | static inline int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int st) |
231 | { | ||
232 | return -ENOSYS; | ||
233 | } | ||
234 | static inline int pm_genpd_name_attach_cpuidle(const char *name, int state) | ||
222 | { | 235 | { |
223 | return -ENOSYS; | 236 | return -ENOSYS; |
224 | } | 237 | } |
225 | static inline int genpd_detach_cpuidle(struct generic_pm_domain *genpd) | 238 | static inline int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd) |
239 | { | ||
240 | return -ENOSYS; | ||
241 | } | ||
242 | static inline int pm_genpd_name_detach_cpuidle(const char *name) | ||
226 | { | 243 | { |
227 | return -ENOSYS; | 244 | return -ENOSYS; |
228 | } | 245 | } |
@@ -234,6 +251,10 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd) | |||
234 | { | 251 | { |
235 | return -ENOSYS; | 252 | return -ENOSYS; |
236 | } | 253 | } |
254 | static inline int pm_genpd_name_poweron(const char *domain_name) | ||
255 | { | ||
256 | return -ENOSYS; | ||
257 | } | ||
237 | static inline bool default_stop_ok(struct device *dev) | 258 | static inline bool default_stop_ok(struct device *dev) |
238 | { | 259 | { |
239 | return false; | 260 | return false; |
@@ -242,6 +263,24 @@ static inline bool default_stop_ok(struct device *dev) | |||
242 | #define pm_domain_always_on_gov NULL | 263 | #define pm_domain_always_on_gov NULL |
243 | #endif | 264 | #endif |
244 | 265 | ||
266 | static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, | ||
267 | struct device *dev) | ||
268 | { | ||
269 | return __pm_genpd_add_device(genpd, dev, NULL); | ||
270 | } | ||
271 | |||
272 | static inline int pm_genpd_of_add_device(struct device_node *genpd_node, | ||
273 | struct device *dev) | ||
274 | { | ||
275 | return __pm_genpd_of_add_device(genpd_node, dev, NULL); | ||
276 | } | ||
277 | |||
278 | static inline int pm_genpd_name_add_device(const char *domain_name, | ||
279 | struct device *dev) | ||
280 | { | ||
281 | return __pm_genpd_name_add_device(domain_name, dev, NULL); | ||
282 | } | ||
283 | |||
245 | static inline int pm_genpd_remove_callbacks(struct device *dev) | 284 | static inline int pm_genpd_remove_callbacks(struct device *dev) |
246 | { | 285 | { |
247 | return __pm_genpd_remove_callbacks(dev, true); | 286 | return __pm_genpd_remove_callbacks(dev, true); |