Lines Matching full:device
3 * pm_runtime.h - Device run-time power management helper functions.
11 #include <linux/device.h>
67 extern int pm_generic_runtime_suspend(struct device *dev);
68 extern int pm_generic_runtime_resume(struct device *dev);
69 extern int pm_runtime_force_suspend(struct device *dev);
70 extern int pm_runtime_force_resume(struct device *dev);
72 extern int __pm_runtime_idle(struct device *dev, int rpmflags);
73 extern int __pm_runtime_suspend(struct device *dev, int rpmflags);
74 extern int __pm_runtime_resume(struct device *dev, int rpmflags);
75 extern int pm_runtime_get_if_active(struct device *dev);
76 extern int pm_runtime_get_if_in_use(struct device *dev);
77 extern int pm_schedule_suspend(struct device *dev, unsigned int delay);
78 extern int __pm_runtime_set_status(struct device *dev, unsigned int status);
79 extern int pm_runtime_barrier(struct device *dev);
80 extern void pm_runtime_enable(struct device *dev);
81 extern void __pm_runtime_disable(struct device *dev, bool check_resume);
82 extern void pm_runtime_allow(struct device *dev);
83 extern void pm_runtime_forbid(struct device *dev);
84 extern void pm_runtime_no_callbacks(struct device *dev);
85 extern void pm_runtime_irq_safe(struct device *dev);
86 extern void __pm_runtime_use_autosuspend(struct device *dev, bool use);
87 extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay);
88 extern u64 pm_runtime_autosuspend_expiration(struct device *dev);
89 extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable);
90 extern void pm_runtime_get_suppliers(struct device *dev);
91 extern void pm_runtime_put_suppliers(struct device *dev);
92 extern void pm_runtime_new_link(struct device *dev);
96 extern int devm_pm_runtime_enable(struct device *dev);
100 * @dev: Target device.
107 static inline void pm_suspend_ignore_children(struct device *dev, bool enable) in pm_suspend_ignore_children()
113 * pm_runtime_get_noresume - Bump up runtime PM usage counter of a device.
114 * @dev: Target device.
116 static inline void pm_runtime_get_noresume(struct device *dev) in pm_runtime_get_noresume()
122 * pm_runtime_put_noidle - Drop runtime PM usage counter of a device.
123 * @dev: Target device.
127 static inline void pm_runtime_put_noidle(struct device *dev) in pm_runtime_put_noidle()
133 * pm_runtime_suspended - Check whether or not a device is runtime-suspended.
134 * @dev: Target device.
144 static inline bool pm_runtime_suspended(struct device *dev) in pm_runtime_suspended()
151 * pm_runtime_active - Check whether or not a device is runtime-active.
152 * @dev: Target device.
162 static inline bool pm_runtime_active(struct device *dev) in pm_runtime_active()
170 * @dev: Target device.
179 static inline bool pm_runtime_status_suspended(struct device *dev) in pm_runtime_status_suspended()
186 * @dev: Target device.
194 static inline bool pm_runtime_enabled(struct device *dev) in pm_runtime_enabled()
201 * @dev: Target device.
203 * Return %true if @dev is a special device without runtime PM callbacks or
206 static inline bool pm_runtime_has_no_callbacks(struct device *dev) in pm_runtime_has_no_callbacks()
212 * pm_runtime_mark_last_busy - Update the last access time of a device.
213 * @dev: Target device.
218 static inline void pm_runtime_mark_last_busy(struct device *dev) in pm_runtime_mark_last_busy()
225 * @dev: Target device.
227 * Return %true if @dev has been marked as an "IRQ-safe" device (with respect
231 static inline bool pm_runtime_is_irq_safe(struct device *dev) in pm_runtime_is_irq_safe()
236 extern u64 pm_runtime_suspended_time(struct device *dev);
242 static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } in pm_generic_runtime_suspend()
243 static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } in pm_generic_runtime_resume()
244 static inline int pm_runtime_force_suspend(struct device *dev) { return 0; } in pm_runtime_force_suspend()
245 static inline int pm_runtime_force_resume(struct device *dev) { return 0; } in pm_runtime_force_resume()
247 static inline int __pm_runtime_idle(struct device *dev, int rpmflags) in __pm_runtime_idle()
251 static inline int __pm_runtime_suspend(struct device *dev, int rpmflags) in __pm_runtime_suspend()
255 static inline int __pm_runtime_resume(struct device *dev, int rpmflags) in __pm_runtime_resume()
259 static inline int pm_schedule_suspend(struct device *dev, unsigned int delay) in pm_schedule_suspend()
263 static inline int pm_runtime_get_if_in_use(struct device *dev) in pm_runtime_get_if_in_use()
267 static inline int pm_runtime_get_if_active(struct device *dev) in pm_runtime_get_if_active()
271 static inline int __pm_runtime_set_status(struct device *dev, in __pm_runtime_set_status()
273 static inline int pm_runtime_barrier(struct device *dev) { return 0; } in pm_runtime_barrier()
274 static inline void pm_runtime_enable(struct device *dev) {} in pm_runtime_enable()
275 static inline void __pm_runtime_disable(struct device *dev, bool c) {} in __pm_runtime_disable()
276 static inline void pm_runtime_allow(struct device *dev) {} in pm_runtime_allow()
277 static inline void pm_runtime_forbid(struct device *dev) {} in pm_runtime_forbid()
279 static inline int devm_pm_runtime_enable(struct device *dev) { return 0; } in devm_pm_runtime_enable()
281 static inline void pm_suspend_ignore_children(struct device *dev, bool enable) {} in pm_suspend_ignore_children()
282 static inline void pm_runtime_get_noresume(struct device *dev) {} in pm_runtime_get_noresume()
283 static inline void pm_runtime_put_noidle(struct device *dev) {} in pm_runtime_put_noidle()
284 static inline bool pm_runtime_suspended(struct device *dev) { return false; } in pm_runtime_suspended()
285 static inline bool pm_runtime_active(struct device *dev) { return true; } in pm_runtime_active()
286 static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } in pm_runtime_status_suspended()
287 static inline bool pm_runtime_enabled(struct device *dev) { return false; } in pm_runtime_enabled()
289 static inline void pm_runtime_no_callbacks(struct device *dev) {} in pm_runtime_no_callbacks()
290 static inline void pm_runtime_irq_safe(struct device *dev) {} in pm_runtime_irq_safe()
291 static inline bool pm_runtime_is_irq_safe(struct device *dev) { return false; } in pm_runtime_is_irq_safe()
293 static inline bool pm_runtime_has_no_callbacks(struct device *dev) { return false; } in pm_runtime_has_no_callbacks()
294 static inline void pm_runtime_mark_last_busy(struct device *dev) {} in pm_runtime_mark_last_busy()
295 static inline void __pm_runtime_use_autosuspend(struct device *dev, in __pm_runtime_use_autosuspend()
297 static inline void pm_runtime_set_autosuspend_delay(struct device *dev, in pm_runtime_set_autosuspend_delay()
300 struct device *dev) { return 0; } in pm_runtime_autosuspend_expiration()
301 static inline void pm_runtime_set_memalloc_noio(struct device *dev, in pm_runtime_set_memalloc_noio()
303 static inline void pm_runtime_get_suppliers(struct device *dev) {} in pm_runtime_get_suppliers()
304 static inline void pm_runtime_put_suppliers(struct device *dev) {} in pm_runtime_put_suppliers()
305 static inline void pm_runtime_new_link(struct device *dev) {} in pm_runtime_new_link()
312 * pm_runtime_idle - Conditionally set up autosuspend of a device or suspend it.
313 * @dev: Target device.
319 static inline int pm_runtime_idle(struct device *dev) in pm_runtime_idle()
325 * pm_runtime_suspend - Suspend a device synchronously.
326 * @dev: Target device.
328 static inline int pm_runtime_suspend(struct device *dev) in pm_runtime_suspend()
334 * pm_runtime_autosuspend - Set up autosuspend of a device or suspend it.
335 * @dev: Target device.
340 static inline int pm_runtime_autosuspend(struct device *dev) in pm_runtime_autosuspend()
346 * pm_runtime_resume - Resume a device synchronously.
347 * @dev: Target device.
349 static inline int pm_runtime_resume(struct device *dev) in pm_runtime_resume()
355 * pm_request_idle - Queue up "idle check" execution for a device.
356 * @dev: Target device.
361 static inline int pm_request_idle(struct device *dev) in pm_request_idle()
367 * pm_request_resume - Queue up runtime-resume of a device.
368 * @dev: Target device.
370 static inline int pm_request_resume(struct device *dev) in pm_request_resume()
376 * pm_request_autosuspend - Queue up autosuspend of a device.
377 * @dev: Target device.
382 static inline int pm_request_autosuspend(struct device *dev) in pm_request_autosuspend()
388 * pm_runtime_get - Bump up usage counter and queue up resume of a device.
389 * @dev: Target device.
394 static inline int pm_runtime_get(struct device *dev) in pm_runtime_get()
400 * pm_runtime_get_sync - Bump up usage counter of a device and resume it.
401 * @dev: Target device.
413 static inline int pm_runtime_get_sync(struct device *dev) in pm_runtime_get_sync()
419 * pm_runtime_resume_and_get - Bump up usage counter of a device and resume it.
420 * @dev: Target device.
426 static inline int pm_runtime_resume_and_get(struct device *dev) in pm_runtime_resume_and_get()
440 * pm_runtime_put - Drop device usage counter and queue up "idle check" if 0.
441 * @dev: Target device.
446 static inline int pm_runtime_put(struct device *dev) in pm_runtime_put()
452 * __pm_runtime_put_autosuspend - Drop device usage counter and queue autosuspend if 0.
453 * @dev: Target device.
458 static inline int __pm_runtime_put_autosuspend(struct device *dev) in __pm_runtime_put_autosuspend()
464 * pm_runtime_put_autosuspend - Drop device usage counter and queue autosuspend if 0.
465 * @dev: Target device.
470 static inline int pm_runtime_put_autosuspend(struct device *dev) in pm_runtime_put_autosuspend()
477 * pm_runtime_put_sync - Drop device usage counter and run "idle check" if 0.
478 * @dev: Target device.
489 static inline int pm_runtime_put_sync(struct device *dev) in pm_runtime_put_sync()
495 * pm_runtime_put_sync_suspend - Drop device usage counter and suspend if 0.
496 * @dev: Target device.
505 static inline int pm_runtime_put_sync_suspend(struct device *dev) in pm_runtime_put_sync_suspend()
511 * pm_runtime_put_sync_autosuspend - Drop device usage counter and autosuspend if 0.
512 * @dev: Target device.
522 static inline int pm_runtime_put_sync_autosuspend(struct device *dev) in pm_runtime_put_sync_autosuspend()
529 * @dev: Target device.
536 static inline int pm_runtime_set_active(struct device *dev) in pm_runtime_set_active()
543 * @dev: Target device.
550 static inline int pm_runtime_set_suspended(struct device *dev) in pm_runtime_set_suspended()
556 * pm_runtime_disable - Disable runtime PM for a device.
557 * @dev: Target device.
565 static inline void pm_runtime_disable(struct device *dev) in pm_runtime_disable()
571 * pm_runtime_use_autosuspend - Allow autosuspend to be used for a device.
572 * @dev: Target device.
582 static inline void pm_runtime_use_autosuspend(struct device *dev) in pm_runtime_use_autosuspend()
589 * @dev: Target device.
595 static inline void pm_runtime_dont_use_autosuspend(struct device *dev) in pm_runtime_dont_use_autosuspend()