On Tuesday 15 December 2009, Alan Stern wrote: > On Mon, 14 Dec 2009, Rafael J. Wysocki wrote: > > > > > > > ->runtime_idle() is still only called for the device's bus type, because > > > > > > otherwise it will be hard to determine the right ordering of the bus type, > > > > > > device type and device class callbacks. > > > > > > > > > > Shouldn't it be the same as runtime_suspend and runtime_resume? > > > > > > > > Well, the ordering is different in each of them ... > > > > > > Why not just copy the order used by device_suspend(): class, then type, > > > then bus? > > > > Do you mean in _idle? > > Idle is very similar to suspend. They should use the same order. > > I guess there's one extra thing to look out for: If one of the idle > callbacks does pm_runtime_suspend() then there's no point invoking the > later callbacks. But how do we know that? I'm still not sure what actually the point executing _idle for device types and device classes is. The only situation I can aticipate if when there's a device without a bus type. Hmm. Actually, are we ever going to call two or more suspend callbacks (ie. bus type one and device type one or device type one and device class one) for the same device? If not, we'll be able to simplify things significantly by making them mutually exclusive (ie. if there's bus type, call bus type, or else if there's device type, call device type, or else if there's device class, call device class). Rafael _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm