Re: [PATCH] Hotplug for device power state changes

From: Patrick Mochel
Date: Tue May 04 2004 - 23:21:44 EST



> The ability to do this was originally requested in the context of a
> driver managing the power state of its devices (according to some
> unspecified logic); agreed that state changes requested via sysfs are a
> less compelling usage scenario. Small battery-powered gadgets often
> implement drivers that are more actively involved in managing power
> state than the desktop/notebook/server norm, invoking LDM suspend
> routines when an opportunity to power down arises. But it is also
> common in wall-plug-wired systems to have a few power state transitions
> that result from things under kernel control, such as blanking a display
> device after a timer expires.

It seems like it would best be done at the class level, rather than the
core driver level, if you wanted to do it all. For things like
communication devices going out of range, you would probably want to
easily support multiple drivers of the same type, so you might as well
abstract it to the class. And, I don't see a reason for it to be
synchronous, since any apps trying to communicate over it will soon
realize it's not available; and any policy in userspace shouldn't by
definition be that critical to the health of the system.

Display blanking is based on user input inactivity, and already works on
most systems.


Pat
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/