Re: [PATCH 2.6.8.1 0/2] leds: new class for led devices

From: Kalin KOZHUHAROV
Date: Thu Sep 02 2004 - 23:57:22 EST


John Lenz wrote:
This is an attempt to provide an alternative to the current arm specific led interface. This arm interface does not integrate well with the device model and sysfs.
I am just curious, but what specific hardware devices can be controlled with this?

[snip]

function : a read/write attribute that sets the current function of this led. The available options are

timer : the led blinks on and off on a timer
idle : the led turns off when the system is idle and on when not idle
power : the led represents the current power state
user : the led is controlled by user space

Please put the power comment in the source too, e.g. :

+enum led_functions {
+ leds_user = 0, /* user has control of this led through sysfs */
+ leds_timer, /* led blinks on a timer */
+ leds_idle, /* led is on when the system is not idle */
+ leds_power, /* led is on when ?????????????????????? */
+};

To be honest, I don't get the meaning of any of the led_functions except leds_user...

light : a read/write attribute that allows userspace to see the current status of the led. If function="user" then writing to this attribute will change the led on or off. If function != "user" then writing has no effect.
light is an integer, where 0 means off, 1 means on first color, 2 means on second color, etc. (for example, if color="green/blue" then light=1 means turn led on to green and if light=2 means turn led on to blue.

Is something like max_colors or num_colors necessary?
Might be handy for changing to the "last" color or something,
but it may as well be done by userspace app.


--
|| ~~~~~~~~~~~~~~~~~~~~~~ ||
( ) http://ThinRope.net/ ( )
|| ______________________ ||

-
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/