Re: best way to handle LEDs
From: John Lenz
Date: Mon Nov 07 2005 - 19:27:33 EST
On Mon, November 7, 2005 5:30 pm, Pavel Machek said:
> Hi!
>
>> >> > I think even slow blinking was used somewhere. I have some code
>> from
>> >> > John Lenz (attached); it uses sysfs interface, exports led collor,
>> and
>> >> > allows setting different frequencies.
>> >> >
>> >> > Is that acceptable, or should some other interface be used?
>> >>
>> >> there is already an LED interface for linux-arm, which is
>> >> used by a number of the extant machines in the sa11x0 and
>> >> pxa range.
>> >
>> > Where is that interface? I think that making collie use it is obvious
>> > first step...
>>
>> I originally wrote the collie led code to use that interface, and you
>> might look at some of the old versions of the patch on my web site. The
>> actual code is in arch/arm/kernel/time.c, but this code calls out to an
>> individual machine function through say arch/arm/mach-sa1100/leds.c...
>> The problem for collie was that the device model for locomo did not
>> allow
>> an easy way to do it... as you can see, in my patch it implements a
>> driver
>> for those leds and the driver model takes care of it.
>>
>> I just looked, and
>> http://www.cs.wisc.edu/~lenz/zaurus/files/patch-2.6.7-jl2.diff.gz
>> contins
>> the implementation of the arm led interface for collie.... not sure if
>> it
>> will still work anymore, but...
>
> It does, after kconfig fixups. Do you think we could get that merged?
> Some led driver is better than none at all.
I wonder, because we are exporting an API to userspace. I don't think the
openembedded people want to use this API, and will hold off doing anything
with the leds till we get something else straigtend out. If we have this
API now, we will have issues breaking it later (or we will have to do some
wierd locking scheme to allow both interfaces control, and crap like
that).
Secondly, leds aren't that importent unless they are supported by the
userspace programs (to do things like blink when email shows up). And
before the userspace starts using leds, I think they might want to clear
up the interface API issue first.
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/