Re: [GIT PULL] LED updates

From: Henrique de Moraes Holschuh
Date: Fri Feb 08 2008 - 06:21:16 EST


On Fri, 08 Feb 2008, Németh Márton wrote:
> Richard Purdie wrote:
> >>> leds: Add support for hardware accelerated LED flashing
> >> This one has a loose end: when you call brightness_set on a led with
> >> hardware flash acceleration, you will leave the trigger armed, BUT the led
> >> won't blink anymore. That's just wrong.
> >
> > Agreed.
>
> My only question is that do you know any LED hardware which can blink _and_
> can set the brightness independently? If there would be such a LED I could

Several, but none on laptops or other stuff that runs Linux. That behaviour
is not common on indicator LEDs. I have seen standby LEDs on laptops which
"blink" by slowly fading from full to off, and then back to full, though.

> imagine that the brightness can be changed while the LED remains blinking at
> some low frequency. For example a simple LED with brightness set possibility and
> blinking directed by software is an example where the blinking and the brightness
> setting are completely independent.

Sure, it is perfectly possible. I am not sure it is *desireable*, though.
The way we have triggers work make what you describe impossible right now,
the software triggers are LED_OFF:LED_FULL, not LED_OFF:old-brightness.

And so are the common hardware triggers on laptops, for that matter.

If we go and fix every trigger to use the current brightness (as long as it
is non-zero) as the "turn LED on" trigger event, then the documentation has
to be changed accordingly to do what you said above, and we would stop the
trigger only by setting brightness to zero or by explicitly removing it.

I don't think it is worth the hassle, though. But we better decide that
*now*, because all this changing of the LED class ABI (even if it is, IMHO,
a big improvement) is not a good idea. We better do it all during the
2.6.25 cycle.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
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/