]> Pileus Git - ~andy/linux/blobdiff - arch/arm/mach-sa1100/hackkit.c
Merge branch 'fixes2' into fixes
[~andy/linux] / arch / arm / mach-sa1100 / hackkit.c
index 7f86bd911826a4327462d577d43c53031c2fe185..fc106aab7c7e4a9e4b175c5a74fc7902f254a53b 100644 (file)
 #include <linux/serial_core.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/tty.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+#include <linux/platform_device.h>
 
 #include <asm/mach-types.h>
 #include <asm/setup.h>
@@ -183,9 +187,37 @@ static struct flash_platform_data hackkit_flash_data = {
 static struct resource hackkit_flash_resource =
        DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M);
 
+/* LEDs */
+struct gpio_led hackkit_gpio_leds[] = {
+       {
+               .name                   = "hackkit:red",
+               .default_trigger        = "cpu0",
+               .gpio                   = 22,
+       },
+       {
+               .name                   = "hackkit:green",
+               .default_trigger        = "heartbeat",
+               .gpio                   = 23,
+       },
+};
+
+static struct gpio_led_platform_data hackkit_gpio_led_info = {
+       .leds           = hackkit_gpio_leds,
+       .num_leds       = ARRAY_SIZE(hackkit_gpio_leds),
+};
+
+static struct platform_device hackkit_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &hackkit_gpio_led_info,
+       }
+};
+
 static void __init hackkit_init(void)
 {
        sa11x0_register_mtd(&hackkit_flash_data, &hackkit_flash_resource, 1);
+       platform_device_register(&hackkit_leds);
 }
 
 /**********************************************************************