PM: sleep: core: Rename DPM_FLAG_LEAVE_SUSPENDED
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 18 Apr 2020 16:53:20 +0000 (18:53 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 24 Apr 2020 19:34:22 +0000 (21:34 +0200)
Rename DPM_FLAG_LEAVE_SUSPENDED to DPM_FLAG_MAY_SKIP_RESUME which
matches its purpose more closely.

No functional impact.

Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de> # for I2C
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Documentation/driver-api/pm/devices.rst
Documentation/power/pci.rst
drivers/acpi/acpi_tad.c
drivers/base/power/main.c
drivers/i2c/busses/i2c-designware-platdrv.c
include/linux/pm.h

index 4ace0eba4506d2cc2bc9ce5901f1b6aded8f61ab..f342c7549b4c8beed931b597c2e8f2951cb23456 100644 (file)
@@ -803,7 +803,7 @@ general.]
 However, it often is desirable to leave devices in suspend after system
 transitions to the working state, especially if those devices had been in
 runtime suspend before the preceding system-wide suspend (or analogous)
-transition.  Device drivers can use the ``DPM_FLAG_LEAVE_SUSPENDED`` flag to
+transition.  Device drivers can use the ``DPM_FLAG_MAY_SKIP_RESUME`` flag to
 indicate to the PM core (and middle-layer code) that they prefer the specific
 devices handled by them to be left suspended and they have no problems with
 skipping their system-wide resume callbacks for this reason.  Whether or not the
@@ -825,7 +825,7 @@ device really can be left in suspend.
 
 For devices whose "noirq", "late" and "early" driver callbacks are invoked
 directly by the PM core, all of the system-wide resume callbacks are skipped if
-``DPM_FLAG_LEAVE_SUSPENDED`` is set and the device is in runtime suspend during
+``DPM_FLAG_MAY_SKIP_RESUME`` is set and the device is in runtime suspend during
 the ``suspend_noirq`` (or analogous) phase or the transition under way is a
 proper system suspend (rather than anything related to hibernation) and the
 device's wakeup settings are suitable for runtime PM (that is, it cannot
index 9e1408121bea877f66f929e5678bc281874ad276..f09b382b46215dfd1eac1fd8d4396206691eb804 100644 (file)
@@ -1029,7 +1029,7 @@ into D0 going forward), but if it is in runtime suspend in pci_pm_thaw_noirq(),
 the function will set the power.direct_complete flag for it (to make the PM core
 skip the subsequent "thaw" callbacks for it) and return.
 
-Setting the DPM_FLAG_LEAVE_SUSPENDED flag means that the driver prefers the
+Setting the DPM_FLAG_MAY_SKIP_RESUME flag means that the driver prefers the
 device to be left in suspend after system-wide transitions to the working state.
 This flag is checked by the PM core, but the PCI bus type informs the PM core
 which devices may be left in suspend from its perspective (that happens during
index 33a4bcdaa4d79a6431238422eba9e7b8412def20..7d45cce0c3c187ffc33e4f7d3526d181acf1088b 100644 (file)
@@ -624,7 +624,7 @@ static int acpi_tad_probe(struct platform_device *pdev)
         */
        device_init_wakeup(dev, true);
        dev_pm_set_driver_flags(dev, DPM_FLAG_SMART_SUSPEND |
-                                    DPM_FLAG_LEAVE_SUSPENDED);
+                                    DPM_FLAG_MAY_SKIP_RESUME);
        /*
         * The platform bus type layer tells the ACPI PM domain powers up the
         * device, so set the runtime PM status of it to "active".
index dbc1e5e7346be0c8b512febb45dfb5f3ecf1e679..aaa4aaf41d27bdebd87cf6ef6d56f36f7dab3f3b 100644 (file)
@@ -1247,7 +1247,7 @@ Skip:
         * to be skipped.
         */
        if (atomic_read(&dev->power.usage_count) > 1 ||
-           !(dev_pm_test_driver_flags(dev, DPM_FLAG_LEAVE_SUSPENDED) &&
+           !(dev_pm_test_driver_flags(dev, DPM_FLAG_MAY_SKIP_RESUME) &&
              dev->power.may_skip_resume))
                dev->power.must_resume = true;
 
index 5536673060cc637d505bcc15cee1c1127e721118..c429d664f655563414374dcf26e541bdefe1a5e8 100644 (file)
@@ -357,12 +357,12 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
        if (dev->flags & ACCESS_NO_IRQ_SUSPEND) {
                dev_pm_set_driver_flags(&pdev->dev,
                                        DPM_FLAG_SMART_PREPARE |
-                                       DPM_FLAG_LEAVE_SUSPENDED);
+                                       DPM_FLAG_MAY_SKIP_RESUME);
        } else {
                dev_pm_set_driver_flags(&pdev->dev,
                                        DPM_FLAG_SMART_PREPARE |
                                        DPM_FLAG_SMART_SUSPEND |
-                                       DPM_FLAG_LEAVE_SUSPENDED);
+                                       DPM_FLAG_MAY_SKIP_RESUME);
        }
 
        /* The code below assumes runtime PM to be disabled. */
index cdb8fbd6ab1880c305a3d2ef1e1428d190fe475b..35796fc49e7a09b7b52778e510512443593ec272 100644 (file)
@@ -547,7 +547,7 @@ struct pm_subsys_data {
  * NO_DIRECT_COMPLETE: Do not apply direct-complete optimization to the device.
  * SMART_PREPARE: Check the return value of the driver's ->prepare callback.
  * SMART_SUSPEND: No need to resume the device from runtime suspend.
- * LEAVE_SUSPENDED: Avoid resuming the device during system resume if possible.
+ * MAY_SKIP_RESUME: Avoid resuming the device during system resume if possible.
  *
  * Setting SMART_PREPARE instructs bus types and PM domains which may want
  * system suspend/resume callbacks to be skipped for the device to return 0 from
@@ -562,13 +562,13 @@ struct pm_subsys_data {
  * invocations of the ->suspend_late and ->suspend_noirq callbacks provided by
  * the driver if they decide to leave the device in runtime suspend.
  *
- * Setting LEAVE_SUSPENDED informs the PM core and middle-layer code that the
+ * Setting MAY_SKIP_RESUME informs the PM core and middle-layer code that the
  * driver prefers the device to be left in suspend after system resume.
  */
 #define DPM_FLAG_NO_DIRECT_COMPLETE    BIT(0)
 #define DPM_FLAG_SMART_PREPARE         BIT(1)
 #define DPM_FLAG_SMART_SUSPEND         BIT(2)
-#define DPM_FLAG_LEAVE_SUSPENDED       BIT(3)
+#define DPM_FLAG_MAY_SKIP_RESUME       BIT(3)
 
 struct dev_pm_info {
        pm_message_t            power_state;