Documentation: PM: Discourage use of deprecated macros

The Documentation refers to some deprecated macros.

Update those parts accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240903172520.3568731-1-andriy.shevchenko@linux.intel.com
[ rjw: Changelog edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Andy Shevchenko 2024-09-03 20:25:20 +03:00 committed by Rafael J. Wysocki
parent a712f03fe8
commit c62362e786
2 changed files with 7 additions and 8 deletions

View File

@ -979,18 +979,17 @@ subsections can be defined as a separate function, it often is convenient to
point two or more members of struct dev_pm_ops to the same routine. There are point two or more members of struct dev_pm_ops to the same routine. There are
a few convenience macros that can be used for this purpose. a few convenience macros that can be used for this purpose.
The SIMPLE_DEV_PM_OPS macro declares a struct dev_pm_ops object with one The DEFINE_SIMPLE_DEV_PM_OPS() declares a struct dev_pm_ops object with one
suspend routine pointed to by the .suspend(), .freeze(), and .poweroff() suspend routine pointed to by the .suspend(), .freeze(), and .poweroff()
members and one resume routine pointed to by the .resume(), .thaw(), and members and one resume routine pointed to by the .resume(), .thaw(), and
.restore() members. The other function pointers in this struct dev_pm_ops are .restore() members. The other function pointers in this struct dev_pm_ops are
unset. unset.
The UNIVERSAL_DEV_PM_OPS macro is similar to SIMPLE_DEV_PM_OPS, but it The DEFINE_RUNTIME_DEV_PM_OPS() is similar to DEFINE_SIMPLE_DEV_PM_OPS(), but it
additionally sets the .runtime_resume() pointer to the same value as additionally sets the .runtime_resume() pointer to pm_runtime_force_resume()
.resume() (and .thaw(), and .restore()) and the .runtime_suspend() pointer to and the .runtime_suspend() pointer to pm_runtime_force_suspend().
the same value as .suspend() (and .freeze() and .poweroff()).
The SET_SYSTEM_SLEEP_PM_OPS can be used inside of a declaration of struct The SYSTEM_SLEEP_PM_OPS() can be used inside of a declaration of struct
dev_pm_ops to indicate that one suspend routine is to be pointed to by the dev_pm_ops to indicate that one suspend routine is to be pointed to by the
.suspend(), .freeze(), and .poweroff() members and one resume routine is to .suspend(), .freeze(), and .poweroff() members and one resume routine is to
be pointed to by the .resume(), .thaw(), and .restore() members. be pointed to by the .resume(), .thaw(), and .restore() members.

View File

@ -811,8 +811,8 @@ subsystem-level dev_pm_ops structure.
Device drivers that wish to use the same function as a system suspend, freeze, Device drivers that wish to use the same function as a system suspend, freeze,
poweroff and runtime suspend callback, and similarly for system resume, thaw, poweroff and runtime suspend callback, and similarly for system resume, thaw,
restore, and runtime resume, can achieve this with the help of the restore, and runtime resume, can achieve similar behaviour with the help of the
UNIVERSAL_DEV_PM_OPS macro defined in include/linux/pm.h (possibly setting its DEFINE_RUNTIME_DEV_PM_OPS() defined in include/linux/pm_runtime.h (possibly setting its
last argument to NULL). last argument to NULL).
8. "No-Callback" Devices 8. "No-Callback" Devices