On Thu, 22 Mar 2007, Scott E. Preece wrote: > I would normally call designs that expect important functions (like > power on/power off) to happen as side effects of other operations (like > opening and closing files) broken to begin with. It's still a bad idea > to hide policy inside the driver. Even though other people have already answered this, I'd like to add my own comments. Firstly, doing power on/power off as side effects of other operations is _not_ a policy choice. It is a design principle: When device D has been idle for more than N ms, it should be put in a low-power state (unless such state changes have been disabled for D by userspace). Of course N will vary for different D's, and the exact choice of N _is_ policy. Thus N should be exposed and configurable by userspace. So should the ability to disable the state changes. But the principle above isn't a policy, it is part of the design. Secondly, this principle _requires_ that power on/power off occur as side effects of other operations, since those other operations affect whether or not the device is idle. If anybody wants to argue against the principle itself, then go ahead and say so. I, for one, don't see anything objectionable about it. Alan Stern _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm