leds: core: Introduce LED pattern trigger

This patch adds a new LED trigger that LED device can configure
to employ software or hardware pattern engine.

Consumers can write 'pattern' file to enable the software pattern
which alters the brightness for the specified duration with one
software timer.

Moreover consumers can write 'hw_pattern' file to enable the hardware
pattern for some LED controllers which can autonomously control
brightness over time, according to some preprogrammed hardware
patterns.

Signed-off-by: Raphael Teysseyre <rteysseyre@gmail.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
This commit is contained in:
Baolin Wang
2018-10-11 12:07:14 +08:00
committed by Jacek Anaszewski
parent 2d00f35c55
commit 5fd752b6b3
5 changed files with 516 additions and 0 deletions

View File

@@ -129,4 +129,11 @@ config LEDS_TRIGGER_NETDEV
This allows LEDs to be controlled by network device activity.
If unsure, say Y.
config LEDS_TRIGGER_PATTERN
tristate "LED Pattern Trigger"
help
This allows LEDs to be controlled by a software or hardware pattern
which is a series of tuples, of brightness and duration (ms).
If unsure, say N
endif # LEDS_TRIGGERS