]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ARM: EXYNOS: Add leds status1 and status2 on Origen board
authorRicardo Salveti de Araujo <ricardo.salveti@linaro.org>
Thu, 19 Jul 2012 05:46:36 +0000 (14:46 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Thu, 19 Jul 2012 05:46:36 +0000 (14:46 +0900)
On Origen board, we have 2 status leds, so adding them as heartbeat and
mmc0 by default. The patch basically adds the platform data required by
leds-gpio driver.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/mach-origen.c

index b563b43fee83ef1bf03804b44e4c42e0cebaeaec..b6d9a8876e45b952fe8c6b56c78ec491fb75e9ab 100644 (file)
@@ -9,6 +9,7 @@
 */
 
 #include <linux/serial_core.h>
+#include <linux/leds.h>
 #include <linux/gpio.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
@@ -503,6 +504,34 @@ static void __init origen_ohci_init(void)
 /* USB OTG */
 static struct s3c_hsotg_plat origen_hsotg_pdata;
 
+static struct gpio_led origen_gpio_leds[] = {
+       {
+               .name                   = "origen::status1",
+               .default_trigger        = "heartbeat",
+               .gpio                   = EXYNOS4_GPX1(3),
+               .active_low             = 1,
+       },
+       {
+               .name                   = "origen::status2",
+               .default_trigger        = "mmc0",
+               .gpio                   = EXYNOS4_GPX1(4),
+               .active_low             = 1,
+       },
+};
+
+static struct gpio_led_platform_data origen_gpio_led_info = {
+       .leds           = origen_gpio_leds,
+       .num_leds       = ARRAY_SIZE(origen_gpio_leds),
+};
+
+static struct platform_device origen_leds_gpio = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &origen_gpio_led_info,
+       },
+};
+
 static struct gpio_keys_button origen_gpio_keys_table[] = {
        {
                .code                   = KEY_MENU,
@@ -682,6 +711,7 @@ static struct platform_device *origen_devices[] __initdata = {
        &exynos4_device_ohci,
        &origen_device_gpiokeys,
        &origen_lcd_hv070wsa,
+       &origen_leds_gpio,
        &origen_device_bluetooth,
 };