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

From: John Lenz
Date: Fri Sep 03 2004 - 13:57:35 EST


On 09/03/04 07:06:34, Jan-Benedict Glaw wrote:
On Fri, 2004-09-03 13:54:04 +0900, Kalin KOZHUHAROV <kalin@xxxxxxxxxxxx>
wrote in message <ch8tdd$1uf$1@xxxxxxxxxxxxx>:
> 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?

For example, the smaller VAX computers offer 8 LEDs which show system
status during IPL. After boot finished, the OS may use them...

> >function : a read/write attribute that sets the current function of
> > 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

Is idle/timer/power hardware-controlled (eg. by a secondary processor,
direct chipset implementation) or is switching on/off controlled by
kernel (eg. heartbeat, IO and ethernet for the LEDs you can find on some
PA-RISC machines)?

Right now the kernel is in sole control. The device I am testing this on is a Sharp Zaurus SL5500, which has two leds that by default are used to light when new mail arrives and if the power is plugged in.

A read-only interface should probably be added?

The function stuff was intended to be controlled by the kernel, but I think now that I should just remove this and let userspace do it. If we just allow userspace an easy way to turn the leds on and off (and stuff like power state is available elsewhere in sysfs) a simple shell script could turn the led to show the power state.

John


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