lkml.org 
[lkml]   [2005]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: best way to handle LEDs
On Wed, Nov 02, 2005 at 12:44:59AM +0100, Pavel Machek wrote:
> Handheld machines have limited number of software-controlled status
> LEDs. Collie, for example has two of them; one is labeled "charge" and
> second is labeled "mail".
>
> At least the "mail" led should be handled from userspace, and it would
> be nice if (at least) different speeds of blinking could be used --
> original Sharp ROM uses at least:
>
> yellow off: not charging
> yellow on: charging
> yellow fast blink: charge error
>
> 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?
>
I would also be in favour of having a more generic interface for
something like this (as opposed to each architecture rolling their own).

For example, sh currently has a very simplistic framework in place where
LED manipulation is done via a heartbeat callback in the machvec for each
timer tick, so it would be nice to have things somewhat more flexible in
this regard (especially for boards with multi-coloured LEDs, and for
userspace input).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-11-02 11:21    [W:0.206 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site