led-trigger: Allow multiple led triggers of the same type
We used to have a static array of trigger types which, allows only one led
per trigger. While this is enough for panic and heartbeat, it falls short when
multiple leds are associated to the default-on trigger. The default-on trigger
is used to turn on a led statically from devicetree and may be used multiple
times.
This patch reworks the led triggers so that a trigger struct is allocated
dynamically when needed and put onto a list.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent ebc5ed5 commit 7dd8ae82311daa9ee22ffc762ea158c3977fb20c
@Sascha Hauer Sascha Hauer authored on 13 Mar 2017
Showing 3 changed files
View
commands/trigger.c
View
drivers/led/led-triggers.c
View
include/led.h