LED: Add LED Timer Trigger
PATCH 3/4 LED: Add LED Timer Trigger
From: Richard Purdie <[email protected]>
Add an example of a complex LED trigger in the form of a generic timer which triggers the LED its attached to at a user specified frequency and duty cycle.
Signed-off-by Richard Purdie <[email protected]>
drivers/leds/Kconfig +7 -0
@@ -22,5 +22,12 @@ These triggers allow kernel events to drive the LEDs and can be configured via sysfs. If unsure, say Y. +config LEDS_TRIGGER_TIMER + tristate "LED Timer Trigger" + depends LEDS_TRIGGERS + help + This allows LEDs to be controlled by a programmable timer + via sysfs. If unsure, say Y. + endmenu
drivers/leds/ledtrig-timer.c new file +170 -0
170 lines not on this page · raw message
drivers/leds/Makefile +3 -0
@@ -3,3 +3,6 @@ obj-$(CONFIG_NEW_LEDS) += led-core.o obj-$(CONFIG_LEDS_CLASS) += led-class.o obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o + +# LED Triggers +obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o