Re: [PATCH RFC] leds: Add status code trigger

From: Pavel Machek
Date: Tue Mar 10 2015 - 04:00:51 EST


Hi!

> > Here is a new trigger. It would allow userspace to make an LED
> > blink with a pattern to show a status (or error) code to a human.
> > This is useful for embedded systems without screen or network
> > access. Obviously, the LED will keep on blinking even if userspace
> > crashes.
>
> Thanks for bringing up this. We did get similar idea and patches
> before. The problem is people are seeking more complicated
> applications like define a script language to do blink such as
> "~~~xxxxx~x~x" and there is a decoder to translate this script to
> program the leds.
>
> It was pointed out we need another API between kernel and user space,
> but I don't have such time to do that.
>
> I will add more people to review this patch and discuss this new
> feature.

And then there are LEDs that can do smooth brightness transitions, and
LEDs that provide RGB colors, and programmable LED engines.

I think I have interface to handle most of the issues: array of
integers in "brightness, length in miliseconds".

So for example slowly blinking LED would be "0 1000msec, 255 1000
msec". On off pattern would be "0 1000msec, 255 0msec, 255 1000msec, 0
0msec".

Rapahael, this should be able to do all the stuff you want to do. It
can also do morse code, slow blinks, and combination of both. Do you
want to try implementing it?

Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/