]> git.baikalelectronics.ru Git - kernel.git/commit
led-class: always implement blinking
authorJohannes Berg <johannes.berg@intel.com>
Thu, 11 Nov 2010 22:05:21 +0000 (14:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Nov 2010 15:55:32 +0000 (07:55 -0800)
commit3ce72f9323a452a1568dd8722b6370e7e442cb46
tree03ce703dce3c5f5afad16a81556608700849d6c5
parent3c3238885fb0d5d0d1387db45ccdc065e6246dbe
led-class: always implement blinking

Currently, blinking LEDs can be awkward because it is not guaranteed that
all LEDs implement blinking.  The trigger that wants it to blink then
needs to implement its own timer solution.

Rather than require that, add led_blink_set() API that triggers can use.
This function will attempt to use hw blinking, but if that fails
implements a timer for it.  To stop blinking again, brightness_set() also
needs to be wrapped into API that will stop the software blink.

As a result of this, the timer trigger becomes a very trivial one, and
hopefully we can finally see triggers using blinking as well because it's
always easy to use.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/leds-class.txt
drivers/leds/Kconfig
drivers/leds/led-class.c
drivers/leds/led-triggers.c
drivers/leds/ledtrig-timer.c
drivers/net/wireless/rt2x00/Kconfig
include/linux/leds.h