On Sat, 2004-12-04 at 16:54 +0100, Pavel Machek wrote: > > I think you meant Darwin (evolution theory), not Darwin (MAC OS X > part)? I meant OS X :) > > The idea is simple. Drivers describe their possible power states in an > > array, which contains: > > > > - state name (ascii) for use by sysfs (see below) > > - some flags (for later use mostly) > > - matching system state > > - additional infos (see below), that is struct can be extended for > > later uses. > > These arrays are going to get big and ugly over time. Actually, that's what I though at first, but after pondering it for a while, I think not. Most drivers will ever only have 2 entries (and we can probably provide a default macro that would create the simple 2 entries array for these even). Drivers with more subtle power management capabilities will have the ability here to expose them in a consistent way to userland. But then, my proposal can be thought more and _added_ on top of our existing plans of fixing the existing callbacks. It's mostly aimed at fixing the userland interaction issue and possibly the partial tree notion (and parent/child dependency) by adding the notion of bus state dependency and bus state providership. (or domain state maybe ? but I like staying away a bit from Darwin's terminology here :) Besides, they do it a bit differently. Ben.