android_kernel_xiaomi_sm8350/Documentation/power
Sakari Ailus a55d55a307 PM: runtime: Add pm_runtime_get_if_active()
[ Upstream commit c111566bea7ccd8a05e2c56f1fb3cbb6f4b7b441 ]

pm_runtime_get_if_in_use() bumps up the PM-runtime usage count if it
is not equal to zero and the device's PM-runtime status is 'active'.
This works for drivers that do not use autoidle, but for those that
do, the function returns zero even when the device is active.

In order to maintain sane device state while the device is powered on
in the hope that it'll be needed, pm_runtime_get_if_active(dev, true)
returns a positive value if the device's PM-runtime status is 'active'
when it is called, in which case it also increments the device's usage
count.

If the second argument of pm_runtime_get_if_active() is 'false', the
function behaves just like pm_runtime_get_if_in_use(), so redefine
the latter as a wrapper around the former.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 81302b1c7c99 ("ALSA: hda: Fix unhandled register update during auto-suspend period")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-30 16:27:12 +02:00
..
powercap
regulator
apm-acpi.rst
basic-pm-debugging.rst
charger-manager.rst
drivers-testing.rst
energy-model.rst
freezing-of-tasks.rst
index.rst
interface.rst
opp.rst
pci.rst
pm_qos_interface.rst
power_supply_class.rst
runtime_pm.rst
s2ram.rst
suspend-and-cpuhotplug.rst
suspend-and-interrupts.rst
swsusp-and-swap-files.rst
swsusp-dmcrypt.rst
swsusp.rst
tricks.rst
userland-swsusp.rst
video.rst