On Wednesday, November 13, 2013 02:16:03 PM Alan Stern wrote: > 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. Well, not really. This doesn't work in general, because the assumptions for running .suspend() (at any time, with user space frozen) are quite different from the assumptions for running .runtime_suspend() (when the device is not in use). So generally .suspend() and .runtime_suspend() should be different. That said .runtime_suspend() generally can be the same as .suspend_late() (and that was the main reason why the latter was introduced in the first place) and analogously for .runtime_resume() and .reasume_early(). Although there are simple cases in which .suspend() and .runtime_suspend() may be the same, I'd still recommend to point .suspend_late and .runtime_suspend to the same routine and leaving .suspend as NULL in those cases too (and analogously for the resume stuff). Thanks, Rafael -- 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