Skip to contentSkip to conversation

LED: Add LED Timer Trigger

PATCH In review Richard Purdie 1 participant 1 message Feb 5, 2006 LED

lore
Share & tools
lore
#0 lore raw

PATCH 4/12 LED: Add LED Timer Trigger

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.15/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/Makefile +3 -0
Index: linux-2.6.15/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
drivers/leds/ledtrig-timer.c new file +205 -0

205 lines not on this page · raw message