]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - arch/arm/mach-sa1100/cerf.c
Merge tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[mirror_ubuntu-jammy-kernel.git] / arch / arm / mach-sa1100 / cerf.c
index 09d7f4b4b35487509840fe72ad0dd2d313c0e285..ad0eb08ea07783f4ea4ec68bb871144425e8cf80 100644 (file)
@@ -17,6 +17,8 @@
 #include <linux/irq.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
 
 #include <mach/hardware.h>
 #include <asm/setup.h>
@@ -28,7 +30,7 @@
 #include <asm/mach/serial_sa1100.h>
 
 #include <mach/cerf.h>
-#include <mach/mcp.h>
+#include <linux/platform_data/mfd-mcp-sa11x0.h>
 #include <mach/irqs.h>
 #include "generic.h"
 
@@ -43,8 +45,48 @@ static struct platform_device cerfuart2_device = {
        .resource       = cerfuart2_resources,
 };
 
+/* LEDs */
+struct gpio_led cerf_gpio_leds[] = {
+       {
+               .name                   = "cerf:d0",
+               .default_trigger        = "heartbeat",
+               .gpio                   = 0,
+       },
+       {
+               .name                   = "cerf:d1",
+               .default_trigger        = "cpu0",
+               .gpio                   = 1,
+       },
+       {
+               .name                   = "cerf:d2",
+               .default_trigger        = "default-on",
+               .gpio                   = 2,
+       },
+       {
+               .name                   = "cerf:d3",
+               .default_trigger        = "default-on",
+               .gpio                   = 3,
+       },
+
+};
+
+static struct gpio_led_platform_data cerf_gpio_led_info = {
+       .leds           = cerf_gpio_leds,
+       .num_leds       = ARRAY_SIZE(cerf_gpio_leds),
+};
+
+static struct platform_device cerf_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &cerf_gpio_led_info,
+       }
+};
+
+
 static struct platform_device *cerf_devices[] __initdata = {
        &cerfuart2_device,
+       &cerf_leds,
 };
 
 #ifdef CONFIG_SA1100_CERF_FLASH_32MB