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, bool ign_usage_count);
76 extern int pm_schedule_suspend(struct device *dev, unsigned int delay);
77 extern int __pm_runtime_set_status(struct device *dev, unsigned int status);
78 extern int pm_runtime_barrier(struct device *dev);
79 extern void pm_runtime_enable(struct device *dev);
80 extern void __pm_runtime_disable(struct device *dev, bool check_resume);
81 extern void pm_runtime_allow(struct device *dev);
82 extern void pm_runtime_forbid(struct device *dev);
83 extern void pm_runtime_no_callbacks(struct device *dev);
84 extern void pm_runtime_irq_safe(struct device *dev);
85 extern void __pm_runtime_use_autosuspend(struct device *dev, bool use);
86 extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay);
87 extern u64 pm_runtime_autosuspend_expiration(struct device *dev);
88 extern void pm_runtime_update_max_time_suspended(struct device *dev,
90 extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable);
91 extern void pm_runtime_get_suppliers(struct device *dev);
92 extern void pm_runtime_put_suppliers(struct device *dev);
93 extern void pm_runtime_new_link(struct device *dev);
97 extern int devm_pm_runtime_enable(struct device *dev);
101 * @dev: Target device.
106 static inline int pm_runtime_get_if_in_use(struct device *dev) in pm_runtime_get_if_in_use()
113 * @dev: Target device.
120 static inline void pm_suspend_ignore_children(struct device *dev, bool enable) in pm_suspend_ignore_children()
126 * pm_runtime_get_noresume - Bump up runtime PM usage counter of a device.
127 * @dev: Target device.
129 static inline void pm_runtime_get_noresume(struct device *dev) in pm_runtime_get_noresume()
135 * pm_runtime_put_noidle - Drop runtime PM usage counter of a device.
136 * @dev: Target device.
140 static inline void pm_runtime_put_noidle(struct device *dev) in pm_runtime_put_noidle()
146 * pm_runtime_suspended - Check whether or not a device is runtime-suspended.
147 * @dev: Target device.
157 static inline bool pm_runtime_suspended(struct device *dev) in pm_runtime_suspended()
164 * pm_runtime_active - Check whether or not a device is runtime-active.
165 * @dev: Target device.
175 static inline bool pm_runtime_active(struct device *dev) in pm_runtime_active()
183 * @dev: Target device.
192 static inline bool pm_runtime_status_suspended(struct device *dev) in pm_runtime_status_suspended()
199 * @dev: Target device.
207 static inline bool pm_runtime_enabled(struct device *dev) in pm_runtime_enabled()
214 * @dev: Target device.
216 * Return %true if @dev is a special device without runtime PM callbacks or
219 static inline bool pm_runtime_has_no_callbacks(struct device *dev) in pm_runtime_has_no_callbacks()
225 * pm_runtime_mark_last_busy - Update the last access time of a device.
226 * @dev: Target device.
231 static inline void pm_runtime_mark_last_busy(struct device *dev) in pm_runtime_mark_last_busy()
238 * @dev: Target device.
240 * Return %true if @dev has been marked as an "IRQ-safe" device (with respect
244 static inline bool pm_runtime_is_irq_safe(struct device *dev) in pm_runtime_is_irq_safe()
249 extern u64 pm_runtime_suspended_time(struct device *dev);
255 static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } in pm_generic_runtime_suspend()
256 static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } in pm_generic_runtime_resume()
257 static inline int pm_runtime_force_suspend(struct device *dev) { return 0; } in pm_runtime_force_suspend()
258 static inline int pm_runtime_force_resume(struct device *dev) { return 0; } in pm_runtime_force_resume()
260 static inline int __pm_runtime_idle(struct device *dev, int rpmflags) in __pm_runtime_idle()
264 static inline int __pm_runtime_suspend(struct device *dev, int rpmflags) in __pm_runtime_suspend()
268 static inline int __pm_runtime_resume(struct device *dev, int rpmflags) in __pm_runtime_resume()
272 static inline int pm_schedule_suspend(struct device *dev, unsigned int delay) in pm_schedule_suspend()
276 static inline int pm_runtime_get_if_in_use(struct device *dev) in pm_runtime_get_if_in_use()
280 static inline int pm_runtime_get_if_active(struct device *dev, in pm_runtime_get_if_active()
285 static inline int __pm_runtime_set_status(struct device *dev, in __pm_runtime_set_status()
287 static inline int pm_runtime_barrier(struct device *dev) { return 0; } in pm_runtime_barrier()
288 static inline void pm_runtime_enable(struct device *dev) {} in pm_runtime_enable()
289 static inline void __pm_runtime_disable(struct device *dev, bool c) {} in __pm_runtime_disable()
290 static inline void pm_runtime_allow(struct device *dev) {} in pm_runtime_allow()
291 static inline void pm_runtime_forbid(struct device *dev) {} in pm_runtime_forbid()
293 static inline int devm_pm_runtime_enable(struct device *dev) { return 0; } in devm_pm_runtime_enable()
295 static inline void pm_suspend_ignore_children(struct device *dev, bool enable) {} in pm_suspend_ignore_children()
296 static inline void pm_runtime_get_noresume(struct device *dev) {} in pm_runtime_get_noresume()
297 static inline void pm_runtime_put_noidle(struct device *dev) {} in pm_runtime_put_noidle()
298 static inline bool pm_runtime_suspended(struct device *dev) { return false; } in pm_runtime_suspended()
299 static inline bool pm_runtime_active(struct device *dev) { return true; } in pm_runtime_active()
300 static inline bool pm_runtime_status_suspended(struct device *dev) { return false; } in pm_runtime_status_suspended()
301 static inline bool pm_runtime_enabled(struct device *dev) { return false; } in pm_runtime_enabled()
303 static inline void pm_runtime_no_callbacks(struct device *dev) {} in pm_runtime_no_callbacks()
304 static inline void pm_runtime_irq_safe(struct device *dev) {} in pm_runtime_irq_safe()
305 static inline bool pm_runtime_is_irq_safe(struct device *dev) { return false; } in pm_runtime_is_irq_safe()
307 static inline bool pm_runtime_has_no_callbacks(struct device *dev) { return false; } in pm_runtime_has_no_callbacks()
308 static inline void pm_runtime_mark_last_busy(struct device *dev) {} in pm_runtime_mark_last_busy()
309 static inline void __pm_runtime_use_autosuspend(struct device *dev, in __pm_runtime_use_autosuspend()
311 static inline void pm_runtime_set_autosuspend_delay(struct device *dev, in pm_runtime_set_autosuspend_delay()
314 struct device *dev) { return 0; } in pm_runtime_autosuspend_expiration()
315 static inline void pm_runtime_set_memalloc_noio(struct device *dev, in pm_runtime_set_memalloc_noio()
317 static inline void pm_runtime_get_suppliers(struct device *dev) {} in pm_runtime_get_suppliers()
318 static inline void pm_runtime_put_suppliers(struct device *dev) {} in pm_runtime_put_suppliers()
319 static inline void pm_runtime_new_link(struct device *dev) {} in pm_runtime_new_link()
326 * pm_runtime_idle - Conditionally set up autosuspend of a device or suspend it.
327 * @dev: Target device.
333 static inline int pm_runtime_idle(struct device *dev) in pm_runtime_idle()
339 * pm_runtime_suspend - Suspend a device synchronously.
340 * @dev: Target device.
342 static inline int pm_runtime_suspend(struct device *dev) in pm_runtime_suspend()
348 * pm_runtime_autosuspend - Set up autosuspend of a device or suspend it.
349 * @dev: Target device.
354 static inline int pm_runtime_autosuspend(struct device *dev) in pm_runtime_autosuspend()
360 * pm_runtime_resume - Resume a device synchronously.
361 * @dev: Target device.
363 static inline int pm_runtime_resume(struct device *dev) in pm_runtime_resume()
369 * pm_request_idle - Queue up "idle check" execution for a device.
370 * @dev: Target device.
375 static inline int pm_request_idle(struct device *dev) in pm_request_idle()
381 * pm_request_resume - Queue up runtime-resume of a device.
382 * @dev: Target device.
384 static inline int pm_request_resume(struct device *dev) in pm_request_resume()
390 * pm_request_autosuspend - Queue up autosuspend of a device.
391 * @dev: Target device.
396 static inline int pm_request_autosuspend(struct device *dev) in pm_request_autosuspend()
402 * pm_runtime_get - Bump up usage counter and queue up resume of a device.
403 * @dev: Target device.
408 static inline int pm_runtime_get(struct device *dev) in pm_runtime_get()
414 * pm_runtime_get_sync - Bump up usage counter of a device and resume it.
415 * @dev: Target device.
427 static inline int pm_runtime_get_sync(struct device *dev) in pm_runtime_get_sync()
433 * pm_runtime_resume_and_get - Bump up usage counter of a device and resume it.
434 * @dev: Target device.
440 static inline int pm_runtime_resume_and_get(struct device *dev) in pm_runtime_resume_and_get()
454 * pm_runtime_put - Drop device usage counter and queue up "idle check" if 0.
455 * @dev: Target device.
460 static inline int pm_runtime_put(struct device *dev) in pm_runtime_put()
466 * pm_runtime_put_autosuspend - Drop device usage counter and queue autosuspend if 0.
467 * @dev: Target device.
472 static inline int pm_runtime_put_autosuspend(struct device *dev) in pm_runtime_put_autosuspend()
479 * pm_runtime_put_sync - Drop device usage counter and run "idle check" if 0.
480 * @dev: Target device.
491 static inline int pm_runtime_put_sync(struct device *dev) in pm_runtime_put_sync()
497 * pm_runtime_put_sync_suspend - Drop device usage counter and suspend if 0.
498 * @dev: Target device.
507 static inline int pm_runtime_put_sync_suspend(struct device *dev) in pm_runtime_put_sync_suspend()
513 * pm_runtime_put_sync_autosuspend - Drop device usage counter and autosuspend if 0.
514 * @dev: Target device.
524 static inline int pm_runtime_put_sync_autosuspend(struct device *dev) in pm_runtime_put_sync_autosuspend()
531 * @dev: Target device.
538 static inline int pm_runtime_set_active(struct device *dev) in pm_runtime_set_active()
545 * @dev: Target device.
552 static inline int pm_runtime_set_suspended(struct device *dev) in pm_runtime_set_suspended()
558 * pm_runtime_disable - Disable runtime PM for a device.
559 * @dev: Target device.
567 static inline void pm_runtime_disable(struct device *dev) in pm_runtime_disable()
573 * pm_runtime_use_autosuspend - Allow autosuspend to be used for a device.
574 * @dev: Target device.
584 static inline void pm_runtime_use_autosuspend(struct device *dev) in pm_runtime_use_autosuspend()
591 * @dev: Target device.
597 static inline void pm_runtime_dont_use_autosuspend(struct device *dev) in pm_runtime_dont_use_autosuspend()