Skip to contentSkip to conversation

S3C24XX GPIO LED support

LEDS Ben Dooks 2 participants 2 messages Apr 1, 2006 – Apr 2, 2006

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

GPIO LED support for Samsung S3C24XX SoC series
processors.

drivers/leds/Kconfig +7 -0
diff -urpN -X ../dontdiff linux-2.6.16-git20/drivers/leds/Kconfig linux-2.6.16-git20-bjd3/drivers/leds/Kconfig
@@ -59,6 +59,13 @@ config LEDS_TOSA
 	  This option enables support for the LEDs on Sharp Zaurus
 	  SL-6000 series.
 
+config LEDS_S3C24XX
+	tristate "LED Support for Samsung S3C24XX GPIO LEDs"
+	depends on LEDS_CLASS && ARCH_S3C2410
+	help
+	  This option enables support for LEDs connected to GPIO lines
+	  on Samsung S3C24XX series CPUs, such as the S3C2410 and S3C2440.
+
 config LEDS_TRIGGER_TIMER
 	tristate "LED Timer Trigger"
 	depends LEDS_TRIGGERS
drivers/leds/Makefile +1 -0
diff -urpN -X ../dontdiff linux-2.6.16-git20/drivers/leds/Makefile linux-2.6.16-git20-bjd3/drivers/leds/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_LEDS_LOCOMO)		+= leds-locom
 obj-$(CONFIG_LEDS_SPITZ)		+= leds-spitz.o
 obj-$(CONFIG_LEDS_IXP4XX)		+= leds-ixp4xx-gpio.o
 obj-$(CONFIG_LEDS_TOSA)			+= leds-tosa.o
+obj-$(CONFIG_LEDS_S3C24XX)		+= leds-s3c24xx.o
 
 # LED Triggers
 obj-$(CONFIG_LEDS_TRIGGER_TIMER)	+= ledtrig-timer.o
drivers/leds/leds-s3c24xx.c +163 -0

163 lines not on this page · raw message

include/asm-arm/arch-s3c2410/leds-gpio.h +28 -0
diff -urpN -X ../dontdiff linux-2.6.16-git20/include/asm-arm/arch-s3c2410/leds-gpio.h linux-2.6.16-git20-bjd3/include/asm-arm/arch-s3c2410/leds-gpio.h
@@ -0,0 +1,28 @@
+/* linux/include/asm-arm/arch-s3c2410/leds-gpio.h
+ *
+ * (c) 2006 Simtec Electronics
+ *	http://armlinux.simtec.co.uk/
+ *	Ben Dooks <[email protected]>
+ *
+ * S3C24XX - LEDs GPIO connector
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#ifndef __ASM_ARCH_LEDSGPIO_H
+#define __ASM_ARCH_LEDSGPIO_H "leds-gpio.h"
+
+#define S3C24XX_LEDF_ACTLOW	(1<<0)		/* LED is on when GPIO low */
+#define S3C24XX_LEDF_TRISTATE	(1<<1)		/* tristate to turn off */
+
+struct s3c24xx_led_platdata {
+	unsigned int		 gpio;
+	unsigned int		 flags;
+
+	char			*name;
+	char			*def_trigger;
+};
+
+#endif /* __ASM_ARCH_LEDSGPIO_H */