PM: sleep: core: Rename DPM_FLAG_NEVER_SKIP
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 18 Apr 2020 16:53:01 +0000 (18:53 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 24 Apr 2020 19:33:09 +0000 (21:33 +0200)
Rename DPM_FLAG_NEVER_SKIP to DPM_FLAG_NO_DIRECT_COMPLETE 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: Bjorn Helgaas <bhelgaas@google.com> # for PCI parts
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
13 files changed:
Documentation/driver-api/pm/devices.rst
Documentation/power/pci.rst
drivers/base/power/main.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/i915/intel_runtime_pm.c
drivers/gpu/drm/radeon/radeon_kms.c
drivers/misc/mei/pci-me.c
drivers/misc/mei/pci-txe.c
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igc/igc_main.c
drivers/pci/pcie/portdrv_pci.c
include/linux/pm.h

index f66c7b9..4ace0eb 100644 (file)
@@ -361,9 +361,9 @@ the phases are: ``prepare``, ``suspend``, ``suspend_late``, ``suspend_noirq``.
        runtime PM disabled.
 
        This feature also can be controlled by device drivers by using the
-       ``DPM_FLAG_NEVER_SKIP`` and ``DPM_FLAG_SMART_PREPARE`` driver power
-       management flags.  [Typically, they are set at the time the driver is
-       probed against the device in question by passing them to the
+       ``DPM_FLAG_NO_DIRECT_COMPLETE`` and ``DPM_FLAG_SMART_PREPARE`` driver
+       power management flags.  [Typically, they are set at the time the driver
+       is probed against the device in question by passing them to the
        :c:func:`dev_pm_set_driver_flags` helper function.]  If the first of
        these flags is set, the PM core will not apply the direct-complete
        procedure described above to the given device and, consequenty, to any
index aa1c7fc..9e14081 100644 (file)
@@ -1004,11 +1004,11 @@ including the PCI bus type.  The flags should be set once at the driver probe
 time with the help of the dev_pm_set_driver_flags() function and they should not
 be updated directly afterwards.
 
-The DPM_FLAG_NEVER_SKIP flag prevents the PM core from using the direct-complete
-mechanism allowing device suspend/resume callbacks to be skipped if the device
-is in runtime suspend when the system suspend starts.  That also affects all of
-the ancestors of the device, so this flag should only be used if absolutely
-necessary.
+The DPM_FLAG_NO_DIRECT_COMPLETE flag prevents the PM core from using the
+direct-complete mechanism allowing device suspend/resume callbacks to be skipped
+if the device is in runtime suspend when the system suspend starts.  That also
+affects all of the ancestors of the device, so this flag should only be used if
+absolutely necessary.
 
 The DPM_FLAG_SMART_PREPARE flag instructs the PCI bus type to only return a
 positive value from pci_pm_prepare() if the ->prepare callback provided by the
index 3170d93..dbc1e5e 100644 (file)
@@ -1844,7 +1844,7 @@ unlock:
        spin_lock_irq(&dev->power.lock);
        dev->power.direct_complete = state.event == PM_EVENT_SUSPEND &&
                (ret > 0 || dev->power.no_pm_callbacks) &&
-               !dev_pm_test_driver_flags(dev, DPM_FLAG_NEVER_SKIP);
+               !dev_pm_test_driver_flags(dev, DPM_FLAG_NO_DIRECT_COMPLETE);
        spin_unlock_irq(&dev->power.lock);
        return 0;
 }
index fd1dc32..a9086ea 100644 (file)
@@ -191,7 +191,7 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
        }
 
        if (adev->runpm) {
-               dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP);
+               dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
                pm_runtime_use_autosuspend(dev->dev);
                pm_runtime_set_autosuspend_delay(dev->dev, 5000);
                pm_runtime_set_active(dev->dev);
index ad719c9..9cb2d75 100644 (file)
@@ -549,7 +549,7 @@ void intel_runtime_pm_enable(struct intel_runtime_pm *rpm)
         * becaue the HDA driver may require us to enable the audio power
         * domain during system suspend.
         */
-       dev_pm_set_driver_flags(kdev, DPM_FLAG_NEVER_SKIP);
+       dev_pm_set_driver_flags(kdev, DPM_FLAG_NO_DIRECT_COMPLETE);
 
        pm_runtime_set_autosuspend_delay(kdev, 10000); /* 10s */
        pm_runtime_mark_last_busy(kdev);
index 58176db..3729623 100644 (file)
@@ -158,7 +158,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
        }
 
        if (radeon_is_px(dev)) {
-               dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP);
+               dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
                pm_runtime_use_autosuspend(dev->dev);
                pm_runtime_set_autosuspend_delay(dev->dev, 5000);
                pm_runtime_set_active(dev->dev);
index 3d21c38..53f16f3 100644 (file)
@@ -240,7 +240,7 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
         * MEI requires to resume from runtime suspend mode
         * in order to perform link reset flow upon system suspend.
         */
-       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
+       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
 
        /*
         * ME maps runtime suspend/resume to D0i states,
index beacf2a..4bf26ce 100644 (file)
@@ -128,7 +128,7 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
         * MEI requires to resume from runtime suspend mode
         * in order to perform link reset flow upon system suspend.
         */
-       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
+       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
 
        /*
         * TXE maps runtime suspend/resume to own power gating states,
index 177c6da..2730b1c 100644 (file)
@@ -7549,7 +7549,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        e1000_print_device_info(adapter);
 
-       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
+       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
 
        if (pci_dev_run_wake(pdev) && hw->mac.type < e1000_pch_cnp)
                pm_runtime_put_noidle(&pdev->dev);
index b46bff8..8bb3db2 100644 (file)
@@ -3445,7 +3445,7 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                }
        }
 
-       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
+       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
 
        pm_runtime_put_noidle(&pdev->dev);
        return 0;
index 69fa1ce..59fc009 100644 (file)
@@ -4825,7 +4825,7 @@ static int igc_probe(struct pci_dev *pdev,
        pcie_print_link_status(pdev);
        netdev_info(netdev, "MAC: %pM\n", netdev->dev_addr);
 
-       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);
+       dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
 
        pm_runtime_put_noidle(&pdev->dev);
 
index 160d67c..3acf151 100644 (file)
@@ -115,7 +115,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
 
        pci_save_state(dev);
 
-       dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NEVER_SKIP |
+       dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE |
                                           DPM_FLAG_SMART_SUSPEND);
 
        if (pci_bridge_d3_possible(dev)) {
index 8c59a7f..cdb8fbd 100644 (file)
@@ -544,7 +544,7 @@ struct pm_subsys_data {
  * These flags can be set by device drivers at the probe time.  They need not be
  * cleared by the drivers as the driver core will take care of that.
  *
- * NEVER_SKIP: Do not skip all system suspend/resume callbacks for the device.
+ * 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.
@@ -554,7 +554,7 @@ struct pm_subsys_data {
  * their ->prepare callbacks if the driver's ->prepare callback returns 0 (in
  * other words, the system suspend/resume callbacks can only be skipped for the
  * device if its driver doesn't object against that).  This flag has no effect
- * if NEVER_SKIP is set.
+ * if NO_DIRECT_COMPLETE is set.
  *
  * Setting SMART_SUSPEND instructs bus types and PM domains which may want to
  * runtime resume the device upfront during system suspend that doing so is not
@@ -565,7 +565,7 @@ struct pm_subsys_data {
  * Setting LEAVE_SUSPENDED 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_NEVER_SKIP            BIT(0)
+#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)