]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge back earlier material related to system sleep
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 17 Jul 2025 17:55:25 +0000 (19:55 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 17 Jul 2025 17:55:25 +0000 (19:55 +0200)
1  2 
Documentation/admin-guide/kernel-parameters.txt
MAINTAINERS
drivers/base/power/main.c

diff --cc MAINTAINERS
Simple merge
index 7a50af416cac8c82a194da9303f551d37c64148b,215c147eed040b838ae0321f925374a4a1f42b42..5d9b3dc9011dc5c644a8ad6811ad4c7e8cd56a9e
@@@ -1278,24 -1301,28 +1301,44 @@@ static bool dpm_async_suspend_parent(st
        /* Start processing the device's parent if it is "async". */
        if (dev->parent)
                dpm_async_with_cleanup(dev->parent, func);
+       return true;
+ }
+ static void dpm_async_suspend_superior(struct device *dev, async_func_t func)
+ {
+       struct device_link *link;
+       int idx;
+       if (!dpm_async_suspend_parent(dev, func))
+               return;
+       idx = device_links_read_lock();
+       /* Start processing the device's "async" suppliers. */
+       list_for_each_entry_rcu(link, &dev->links.suppliers, c_node)
+               if (READ_ONCE(link->status) != DL_STATE_DORMANT)
+                       dpm_async_with_cleanup(link->supplier, func);
+       device_links_read_unlock(idx);
  }
  
 +static void dpm_async_suspend_complete_all(struct list_head *device_list)
 +{
 +      struct device *dev;
 +
 +      guard(mutex)(&async_wip_mtx);
 +
 +      list_for_each_entry_reverse(dev, device_list, power.entry) {
 +              /*
 +               * In case the device is being waited for and async processing
 +               * has not started for it yet, let the waiters make progress.
 +               */
 +              if (!dev->power.work_in_progress)
 +                      complete_all(&dev->power.completion);
 +      }
 +}
 +
  /**
   * resume_event - Return a "resume" message for given "suspend" sleep state.
   * @sleep_state: PM message representing a sleep state.