January 5th, 2006

/sys/devices/pci0000:00/*/power/state

...is a mess. It takes 0/2 as an argument (0 being on, 2 being off), yet userspace likes to write 3 there. Kernel then happily forwards that down to the drivers. When I try to fix it, I get explained that devices need more than 2 states (when apparently noone noticed this mess for a year -- i.e. noone is using it) and all sorts of complicated stuff is suggested :-(.

Can't we just switch that to "on" and "off" now, and worry about more complex states when someone needs them?