On Tue 2006-08-29 21:52:26, David Singleton wrote: > On 8/29/06, Pavel Machek <pavel at ucw.cz> wrote: > >Hi! > >> >> /sys/power/operating_points/high > >> >> /sys/power/operating_points/highest > >> >> /sys/power/operating_points/low > >> >> /sys/power/operating_points/lowest > >> >> /sys/power/operating_points/medium > >> >> /sys/power/operating_points/mem > >> >> /sys/power/operating_points/standby .... > >That does not make mixing them right. > > Both OpPoint and PowerOp are going to 'mix' frequency, voltage > and sleep states into their operating point concepts. > > The point was not to make it look like I was mixing sleep states and > CPU frequency states, but to present all the power states > supported by the system in one place and with one interface. It simplifies > not only kernel code, but power manager code as well. It is also wrong. And no, I do not think your power manager can properly use "mem" state. You see, "mem" is very different from lowest. To exit lowest, you have to "echo highest > state". To exit "mem", you need power button. That's very different operation. > >> Perhaps, but the common name space makes it easy for the > >> power manager > >> daemon to perform the same functions without having to > >> know that the lowest > >> speed on my laptop is 600Mhz. > > > >And enumerate english strings in power daemon? Limiting the numver of > >states? > > Hah, I didn't think of it that way. I was thinking in the same way > "mem" and "disk" and "standy" are strings in the kernel. > The names themselves don't mean anything other than to imply an order so the > kernel and power manager can understand the same order. mem/disk/standby are strings, because they can not be easily turned into numbers. "low"/"lowest"/"high"/"highest" mess can easily be turned into numbers. And that's what cpufreq does, btw. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html