On Saturday 15 August 2009, Matthew Garrett wrote: > On Fri, Aug 14, 2009 at 10:05:19PM +0200, Rafael J. Wysocki wrote: > > > Well, sometimes the user may want a device to be power managed at run time > > and not to be able to wake up the system from sleep states. For example, > > I'd like the USB controller in my box to be suspended at run time whenever it's > > not used, but surely I wouldn't like it to do system-wide wakeup, because it > > does that when I move the mouse which is a cordless one. Simply turning the > > mouse on causes the system to wake up. :-) > > Right, so clearly my code is broken right now. > > > Why don't we add a flag indicating whether or not the device is allowed to > > be power managed at run time, something like runtime_forbidden, that the > > user space will be able to set through sysfs? > > I think even having a runtime_wakeup flag (which defaults to on) would > be sufficient. Perhaps it would, but then unsetting runtime_wakeup would effectively disable runtime PM for devices that need it to be power managed at run time (probably all input devices). Also there may be situations in which user space may really want to disable runtime PM for some devices (think of broken hardware for one example). > If the worst case is scenario is that we have to resume > devices in order to apply the correct policy when going into a > systemwide suspend state, I think that's acceptable. I agree. Thanks, Rafael _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm