Lines Matching +full:up +full:- +full:counter
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * pm_runtime.h - Device run-time power management helper functions.
99 * pm_suspend_ignore_children - Set runtime PM behavior regarding children.
109 dev->power.ignore_children = enable; in pm_suspend_ignore_children()
113 * pm_runtime_get_noresume - Bump up runtime PM usage counter of a device.
118 atomic_inc(&dev->power.usage_count); in pm_runtime_get_noresume()
122 * pm_runtime_put_noidle - Drop runtime PM usage counter of a device.
125 * Decrement the runtime PM usage counter of @dev unless it is 0 already.
129 atomic_add_unless(&dev->power.usage_count, -1, 0); in pm_runtime_put_noidle()
133 * pm_runtime_suspended - Check whether or not a device is runtime-suspended.
146 return dev->power.runtime_status == RPM_SUSPENDED in pm_runtime_suspended()
147 && !dev->power.disable_depth; in pm_runtime_suspended()
151 * pm_runtime_active - Check whether or not a device is runtime-active.
164 return dev->power.runtime_status == RPM_ACTIVE in pm_runtime_active()
165 || dev->power.disable_depth; in pm_runtime_active()
169 * pm_runtime_status_suspended - Check if runtime PM status is "suspended".
181 return dev->power.runtime_status == RPM_SUSPENDED; in pm_runtime_status_suspended()
185 * pm_runtime_enabled - Check if runtime PM is enabled.
196 return !dev->power.disable_depth; in pm_runtime_enabled()
200 * pm_runtime_has_no_callbacks - Check if runtime PM callbacks may be present.
208 return dev->power.no_callbacks; in pm_runtime_has_no_callbacks()
212 * pm_runtime_mark_last_busy - Update the last access time of a device.
220 WRITE_ONCE(dev->power.last_busy, ktime_get_mono_fast_ns()); in pm_runtime_mark_last_busy()
224 * pm_runtime_is_irq_safe - Check if runtime PM can work in interrupt context.
227 * Return %true if @dev has been marked as an "IRQ-safe" device (with respect
233 return dev->power.irq_safe; in pm_runtime_is_irq_safe()
249 return -ENOSYS; in __pm_runtime_idle()
253 return -ENOSYS; in __pm_runtime_suspend()
261 return -ENOSYS; in pm_schedule_suspend()
265 return -EINVAL; in pm_runtime_get_if_in_use()
269 return -EINVAL; in pm_runtime_get_if_active()
312 * pm_runtime_idle - Conditionally set up autosuspend of a device or suspend it.
316 * set up autosuspend of @dev or suspend it (depending on whether or not
325 * pm_runtime_suspend - Suspend a device synchronously.
334 * pm_runtime_autosuspend - Set up autosuspend of a device or suspend it.
337 * Set up autosuspend of @dev or suspend it (depending on whether or not
346 * pm_runtime_resume - Resume a device synchronously.
355 * pm_request_idle - Queue up "idle check" execution for a device.
358 * Queue up a work item to run an equivalent of pm_runtime_idle() for @dev
367 * pm_request_resume - Queue up runtime-resume of a device.
376 * pm_request_autosuspend - Queue up autosuspend of a device.
379 * Queue up a work item to run an equivalent pm_runtime_autosuspend() for @dev
388 * pm_runtime_get - Bump up usage counter and queue up resume of a device.
391 * Bump up the runtime PM usage counter of @dev and queue up a work item to
392 * carry out runtime-resume of it.
400 * pm_runtime_get_sync - Bump up usage counter of a device and resume it.
403 * Bump up the runtime PM usage counter of @dev and carry out runtime-resume of
407 * pm_runtime_resume() and the runtime PM usage counter of @dev remains
419 * pm_runtime_resume_and_get - Bump up usage counter of a device and resume it.
423 * PM usage counter. Return 0 if the runtime PM usage counter of @dev has been
440 * pm_runtime_put - Drop device usage counter and queue up "idle check" if 0.
443 * Decrement the runtime PM usage counter of @dev and if it turns out to be
444 * equal to 0, queue up a work item for @dev like in pm_request_idle().
452 * __pm_runtime_put_autosuspend - Drop device usage counter and queue autosuspend if 0.
455 * Decrement the runtime PM usage counter of @dev and if it turns out to be
456 * equal to 0, queue up a work item for @dev like in pm_request_autosuspend().
464 * pm_runtime_put_autosuspend - Drop device usage counter and queue autosuspend if 0.
467 * Decrement the runtime PM usage counter of @dev and if it turns out to be
468 * equal to 0, queue up a work item for @dev like in pm_request_autosuspend().
477 * pm_runtime_put_sync - Drop device usage counter and run "idle check" if 0.
480 * Decrement the runtime PM usage counter of @dev and if it turns out to be
482 * return value, set up autosuspend of @dev or suspend it (depending on whether
486 * pm_runtime_idle() and the runtime PM usage counter of @dev remains
495 * pm_runtime_put_sync_suspend - Drop device usage counter and suspend if 0.
498 * Decrement the runtime PM usage counter of @dev and if it turns out to be
499 * equal to 0, carry out runtime-suspend of @dev synchronously.
502 * pm_runtime_suspend() and the runtime PM usage counter of @dev remains
511 * pm_runtime_put_sync_autosuspend - Drop device usage counter and autosuspend if 0.
514 * Decrement the runtime PM usage counter of @dev and if it turns out to be
515 * equal to 0, set up autosuspend of @dev or suspend it synchronously (depending
519 * pm_runtime_autosuspend() and the runtime PM usage counter of @dev remains
528 * pm_runtime_set_active - Set runtime PM status to "active".
542 * pm_runtime_set_suspended - Set runtime PM status to "suspended".
556 * pm_runtime_disable - Disable runtime PM for a device.
560 * "blocking" counter).
571 * pm_runtime_use_autosuspend - Allow autosuspend to be used for a device.
575 * requested (or "autosuspend" will be handled as direct runtime-suspend for
588 * pm_runtime_dont_use_autosuspend - Prevent autosuspend from being used.
592 * means that "autosuspend" will be handled as direct runtime-suspend for it