pm_runtime_get_if_in_use(9)
π pm_runtime_get_if_in_use(9) π
okay bestie, welcome to the Kernel API Manual β todayβs main character is pm_runtime_get_if_in_use, and itβs giving conditional runtime PM counter bump energy. π
β¨
β¨ NAME β¨
pm_runtime_get_if_in_use β conditionally bump up the runtime PM usage counter. Thatβs the whole vibe. π
π SYNOPSIS π
int pm_runtime_get_if_in_use (struct device *dev );
πΈ ARGUMENTS πΈ
devβ target device. The one and only device weβre checking, bestie. π«Ά
π DESCRIPTION π
okay so hereβs the tea β: this function increments the runtime PM usage counter of dev only if the conditions line up. The bump happens if devβs runtime PM status is RPM_ACTIVE and its runtime PM usage counter is greater than 0 or it is not ignoring children and its active child count is nonzero. When that happens, 1 is returned. slay. β¨
If dev is in a different state or it is not in use β meaning its usage counter is 0, or it is ignoring children, or its active child count is 0 β then 0 is returned. No bump, no drama. π
And if runtime PM is disabled for the device, -EINVAL is returned. In that case the usage counter of dev is not updated either. so no sneaky increment, okay? π
π SEE ALSO π
Kernel file: ./drivers/base/power/runtime.c π
Related functions, exact names and all:
update_pm_runtime_accounting(9),pm_runtime_deactivate_timer(9),pm_runtime_cancel_pending(9),rpm_check_suspend_allowed(9),pm_runtime_release_supplier(9),__rpm_callback(9),rpm_callback(9),rpm_idle(9),rpm_suspend(9),rpm_resume(9)pm_runtime_work(9),pm_suspend_timer_fn(9),pm_schedule_suspend(9),__pm_runtime_idle(9),__pm_runtime_suspend(9),__pm_runtime_resume(9),pm_runtime_get_conditional(9),pm_runtime_get_if_active(9),__pm_runtime_set_status(9),__pm_runtime_barrier(9)pm_runtime_barrier(9),pm_runtime_enable(9),devm_pm_runtime_set_active_enabled(9),devm_pm_runtime_enable(9),devm_pm_runtime_get_noresume(9),pm_runtime_forbid(9),pm_runtime_allow(9),pm_runtime_no_callbacks(9),pm_runtime_irq_safe(9),update_autosuspend(9)pm_runtime_set_autosuspend_delay(9),__pm_runtime_use_autosuspend(9),pm_runtime_init(9),pm_runtime_reinit(9),pm_runtime_remove(9),pm_runtime_get_suppliers(9),pm_runtime_put_suppliers(9),pm_runtime_drop_link(9),pm_runtime_force_suspend(9),pm_runtime_force_resume(9)
π cute sign-off: source/version ./drivers/base/power, date October 2026, page for pm_runtime_get_if_in_use(9). bye bestie β go bump those counters responsibly! π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms