diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-06-27 21:15:59 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-07-03 17:10:40 +0200 |
commit | e21bd84c2f1dd2900adb343a796bc88101ce48d0 (patch) | |
tree | 97d654597af4c174328a089f05018931d74fc69e /scripts/lib/kdoc/kdoc_files.py | |
parent | c021c1b38f90d639423c1369625daa703a8472ea (diff) |
PM: Make pm_runtime_force_resume() work with DPM_FLAG_SMART_SUSPEND
Curently, drivers using pm_runtime_force_suspend/resume() cannot set
DPM_FLAG_SMART_SUSPEND because the devices with that flag set may need
to be resumed during system-wide resume regardless of whether or not
they have power.needs_force_resume set. That can happen due to a
dependency resolved at the beginning of a system-wide resume transition
(for instance, a bus type or PM domain has decided to resume a
subordinate device with DPM_FLAG_SMART_SUSPEND and its parent and
suppliers also need to be resumed).
To overcome this limitation, modify pm_runtime_force_resume() to check
the device's power.smart_suspend flag (which is set for devices with
DPM_FLAG_SMART_SUSPEND set that meet some additional requirements) and
the device's runtime PM status in addition to power.needs_force_resume.
Also change it to clear power.smart_suspend to ensure that it will not
handle the same device twice during one transition.
The underlying observation is that there are two cases in which the
device needs to be resumed by pm_runtime_force_resume(). One of them
is when the device has power.needs_force_resume set, which means that
pm_runtime_force_suspend() has suspended it and decided that it should
be resumed during the subsequent system resume. The other one is when
power.smart_suspend is set and the device's runtume PM status is
RPM_ACTIVE.
Update kerneldoc comments in accordance with the code changes.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/3662906.iIbC2pHGDl@rjwysocki.net
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions