Lines Matching +full:autosuspend +full:- +full:delay
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * pm_runtime.h - Device run-time power management helper functions.
42 extern int pm_schedule_suspend(struct device *dev, unsigned int delay);
52 extern void pm_runtime_set_autosuspend_delay(struct device *dev, int delay);
65 * pm_runtime_get_if_in_use - Conditionally bump up runtime PM usage counter.
77 * pm_suspend_ignore_children - Set runtime PM behavior regarding children.
87 dev->power.ignore_children = enable; in pm_suspend_ignore_children()
91 * pm_runtime_get_noresume - Bump up runtime PM usage counter of a device.
96 atomic_inc(&dev->power.usage_count); in pm_runtime_get_noresume()
100 * pm_runtime_put_noidle - Drop runtime PM usage counter of a device.
107 atomic_add_unless(&dev->power.usage_count, -1, 0); in pm_runtime_put_noidle()
111 * pm_runtime_suspended - Check whether or not a device is runtime-suspended.
124 return dev->power.runtime_status == RPM_SUSPENDED in pm_runtime_suspended()
125 && !dev->power.disable_depth; in pm_runtime_suspended()
129 * pm_runtime_active - Check whether or not a device is runtime-active.
142 return dev->power.runtime_status == RPM_ACTIVE in pm_runtime_active()
143 || dev->power.disable_depth; in pm_runtime_active()
147 * pm_runtime_status_suspended - Check if runtime PM status is "suspended".
159 return dev->power.runtime_status == RPM_SUSPENDED; in pm_runtime_status_suspended()
163 * pm_runtime_enabled - Check if runtime PM is enabled.
174 return !dev->power.disable_depth; in pm_runtime_enabled()
178 * pm_runtime_has_no_callbacks - Check if runtime PM callbacks may be present.
186 return dev->power.no_callbacks; in pm_runtime_has_no_callbacks()
190 * pm_runtime_mark_last_busy - Update the last access time of a device.
193 * Update the last access time of @dev used by the runtime PM autosuspend
198 WRITE_ONCE(dev->power.last_busy, ktime_get_mono_fast_ns()); in pm_runtime_mark_last_busy()
202 * pm_runtime_is_irq_safe - Check if runtime PM can work in interrupt context.
205 * Return %true if @dev has been marked as an "IRQ-safe" device (with respect
211 return dev->power.irq_safe; in pm_runtime_is_irq_safe()
227 return -ENOSYS; in __pm_runtime_idle()
231 return -ENOSYS; in __pm_runtime_suspend()
237 static inline int pm_schedule_suspend(struct device *dev, unsigned int delay) in pm_schedule_suspend() argument
239 return -ENOSYS; in pm_schedule_suspend()
243 return -EINVAL; in pm_runtime_get_if_in_use()
248 return -EINVAL; in pm_runtime_get_if_active()
277 int delay) {} in pm_runtime_set_autosuspend_delay() argument
290 * pm_runtime_idle - Conditionally set up autosuspend of a device or suspend it.
294 * set up autosuspend of @dev or suspend it (depending on whether or not
295 * autosuspend has been enabled for it).
303 * pm_runtime_suspend - Suspend a device synchronously.
312 * pm_runtime_autosuspend - Set up autosuspend of a device or suspend it.
315 * Set up autosuspend of @dev or suspend it (depending on whether or not
316 * autosuspend is enabled for it) without engaging its "idle check" callback.
324 * pm_runtime_resume - Resume a device synchronously.
333 * pm_request_idle - Queue up "idle check" execution for a device.
345 * pm_request_resume - Queue up runtime-resume of a device.
354 * pm_request_autosuspend - Queue up autosuspend of a device.
366 * pm_runtime_get - Bump up usage counter and queue up resume of a device.
370 * carry out runtime-resume of it.
378 * pm_runtime_get_sync - Bump up usage counter of a device and resume it.
381 * Bump up the runtime PM usage counter of @dev and carry out runtime-resume of
397 * pm_runtime_resume_and_get - Bump up usage counter of a device and resume it.
418 * pm_runtime_put - Drop device usage counter and queue up "idle check" if 0.
430 * pm_runtime_put_autosuspend - Drop device usage counter and queue autosuspend if 0.
443 * pm_runtime_put_sync - Drop device usage counter and run "idle check" if 0.
448 * return value, set up autosuspend of @dev or suspend it (depending on whether
449 * or not autosuspend has been enabled for it).
461 * pm_runtime_put_sync_suspend - Drop device usage counter and suspend if 0.
465 * equal to 0, carry out runtime-suspend of @dev synchronously.
477 * pm_runtime_put_sync_autosuspend - Drop device usage counter and autosuspend if 0.
481 * equal to 0, set up autosuspend of @dev or suspend it synchronously (depending
482 * on whether or not autosuspend has been enabled for it).
494 * pm_runtime_set_active - Set runtime PM status to "active".
508 * pm_runtime_set_suspended - Set runtime PM status to "suspended".
522 * pm_runtime_disable - Disable runtime PM for a device.
537 * pm_runtime_use_autosuspend - Allow autosuspend to be used for a device.
540 * Allow the runtime PM autosuspend mechanism to be used for @dev whenever
541 * requested (or "autosuspend" will be handled as direct runtime-suspend for
550 * pm_runtime_dont_use_autosuspend - Prevent autosuspend from being used.
553 * Prevent the runtime PM autosuspend mechanism from being used for @dev which
554 * means that "autosuspend" will be handled as direct runtime-suspend for it