Skip to contentSkip to conversation

LED: Add LED Timer Trigger

PATCH In review Richard Purdie 1 participant 1 message Mar 29, 2006 LED

lore
Share & tools
lore
#0 lore raw

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.

drivers/leds/Kconfig +7 -0
Index: linux-2.6.16/drivers/leds/Kconfig
===================================================================
@@ -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
Index: linux-2.6.16/drivers/leds/Makefile
===================================================================
@@ -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