mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] Documentation: PM: Discourage use of deprecated macros
@ 2024-09-03 17:25 Andy Shevchenko
  2024-09-04 12:38 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-09-03 17:25 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Sakari Ailus, linux-pm, linux-kernel
  Cc: Rafael J. Wysocki, Len Brown, Pavel Machek

The Documentation refers to some deprecated macros.
Update those parts accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Documentation/power/pci.rst        | 11 +++++------
 Documentation/power/runtime_pm.rst |  4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/Documentation/power/pci.rst b/Documentation/power/pci.rst
index e2c1fb8a569a..9ebecb7b00b2 100644
--- a/Documentation/power/pci.rst
+++ b/Documentation/power/pci.rst
@@ -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
 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()
 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
 unset.
 
-The UNIVERSAL_DEV_PM_OPS macro is similar to SIMPLE_DEV_PM_OPS, but it
-additionally sets the .runtime_resume() pointer to the same value as
-.resume() (and .thaw(), and .restore()) and the .runtime_suspend() pointer to
-the same value as .suspend() (and .freeze() and .poweroff()).
+The DEFINE_RUNTIME_DEV_PM_OPS() is similar to DEFINE_SIMPLE_DEV_PM_OPS(), but it
+additionally sets the .runtime_resume() pointer to pm_runtime_force_resume()
+and the .runtime_suspend() pointer to pm_runtime_force_suspend().
 
-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
 .suspend(), .freeze(), and .poweroff() members and one resume routine is to
 be pointed to by the .resume(), .thaw(), and .restore() members.
diff --git a/Documentation/power/runtime_pm.rst b/Documentation/power/runtime_pm.rst
index 5c4e730f38d0..53d1996460ab 100644
--- a/Documentation/power/runtime_pm.rst
+++ b/Documentation/power/runtime_pm.rst
@@ -811,8 +811,8 @@ subsystem-level dev_pm_ops structure.
 
 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,
-restore, and runtime resume, can achieve this with the help of the
-UNIVERSAL_DEV_PM_OPS macro defined in include/linux/pm.h (possibly setting its
+restore, and runtime resume, can achieve similar behaviour with the help of the
+DEFINE_RUNTIME_DEV_PM_OPS() defined in include/linux/pm_runtime.h (possibly setting its
 last argument to NULL).
 
 8. "No-Callback" Devices
-- 
2.43.0.rc1.1336.g36b5255a03ac


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] Documentation: PM: Discourage use of deprecated macros
  2024-09-03 17:25 [PATCH v1 1/1] Documentation: PM: Discourage use of deprecated macros Andy Shevchenko
@ 2024-09-04 12:38 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2024-09-04 12:38 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, Sakari Ailus, linux-pm, linux-kernel,
	Rafael J. Wysocki, Len Brown, Pavel Machek

On Tue, Sep 3, 2024 at 7:25 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> The Documentation refers to some deprecated macros.
> Update those parts accordingly.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  Documentation/power/pci.rst        | 11 +++++------
>  Documentation/power/runtime_pm.rst |  4 ++--
>  2 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/power/pci.rst b/Documentation/power/pci.rst
> index e2c1fb8a569a..9ebecb7b00b2 100644
> --- a/Documentation/power/pci.rst
> +++ b/Documentation/power/pci.rst
> @@ -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
>  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()
>  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
>  unset.
>
> -The UNIVERSAL_DEV_PM_OPS macro is similar to SIMPLE_DEV_PM_OPS, but it
> -additionally sets the .runtime_resume() pointer to the same value as
> -.resume() (and .thaw(), and .restore()) and the .runtime_suspend() pointer to
> -the same value as .suspend() (and .freeze() and .poweroff()).
> +The DEFINE_RUNTIME_DEV_PM_OPS() is similar to DEFINE_SIMPLE_DEV_PM_OPS(), but it
> +additionally sets the .runtime_resume() pointer to pm_runtime_force_resume()
> +and the .runtime_suspend() pointer to pm_runtime_force_suspend().
>
> -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
>  .suspend(), .freeze(), and .poweroff() members and one resume routine is to
>  be pointed to by the .resume(), .thaw(), and .restore() members.
> diff --git a/Documentation/power/runtime_pm.rst b/Documentation/power/runtime_pm.rst
> index 5c4e730f38d0..53d1996460ab 100644
> --- a/Documentation/power/runtime_pm.rst
> +++ b/Documentation/power/runtime_pm.rst
> @@ -811,8 +811,8 @@ subsystem-level dev_pm_ops structure.
>
>  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,
> -restore, and runtime resume, can achieve this with the help of the
> -UNIVERSAL_DEV_PM_OPS macro defined in include/linux/pm.h (possibly setting its
> +restore, and runtime resume, can achieve similar behaviour with the help of the
> +DEFINE_RUNTIME_DEV_PM_OPS() defined in include/linux/pm_runtime.h (possibly setting its
>  last argument to NULL).
>
>  8. "No-Callback" Devices
> --

Applied as 6.12 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-04 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-03 17:25 [PATCH v1 1/1] Documentation: PM: Discourage use of deprecated macros Andy Shevchenko
2024-09-04 12:38 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®