On Wed, 13 Nov 2013, Ulf Hansson wrote: > The PM core was preventing devices from going inactive during system > suspend. Remove this constraint and moreover try to inactivate devices > by invoking pm_runtime_idle() before proceeding with device's > suspend_late callbacks. > > A great amount of drivers that uses runtime PM will benefit from this. It's not clear how drivers will benefit. > Drivers that implements some of the system ->suspend* callbacks for the > only reason of making sure the runtime PM resourses gets inactive, can > now solely instead rely on the PM core to handle this. Drivers don't have to implement anything special if they want to use their runtime routines for system suspend. All they have to do is set the .suspend and .resume method pointers to point to their runtime_suspend and runtime_resume routines. > In the case were drivers needs there runtime resourses to be activated > to be able to handle their system suspend tasks, those can easily just > restore the runtime PM usage count, pm_runtime_put_sync(), once done > with it's suspend operations, which then will inactivate the device. The reason for doing things the way they are is to avoid races between system PM callbacks and runtime PM callbacks. We don't want to have a runtime_resume routine powering up a device at the same time as a suspend routine is powering it down. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html