lkml.org 
[lkml]   [2004]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PATCH 2.6.8.1 0/2] leds: new class for led devices
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.

We create a new class that drivers can register a leds_properties
structure with. Each led that is registered is assigned a number, and
three attributes are exported to sysfs in /sys/class/leds/1/, /sys/
class/leds/2, etc.

color : a read only string attribute that shows the available colors of
this led. If it is a multi-color led, then the colors are seperated by
a "/" (for example "green/blue").

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

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.

A device and driver symlink point to the actual driver and such, so any
extra attributes can also be registered.

Signed-off-by: John Lenz <lenz@cs.wisc.edu>

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

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.147 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site