aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Salveti de Araujo <ricardo.salveti@linaro.org>2012-07-19 01:46:36 -0400
committerKukjin Kim <kgene.kim@samsung.com>2012-07-19 01:46:36 -0400
commit29e7d58775373cb9f244fd0bc1a714643a498cbb (patch)
treeec1ea925061f6634086150e67127a1861e2dc0f1
parent70660e5d1aa1376a6e9ad2de94bfaf39c2d1545c (diff)
ARM: EXYNOS: Add leds status1 and status2 on Origen board
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>
-rw-r--r--arch/arm/mach-exynos/mach-origen.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index b563b43fee83..b6d9a8876e45 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -9,6 +9,7 @@
9*/ 9*/
10 10
11#include <linux/serial_core.h> 11#include <linux/serial_core.h>
12#include <linux/leds.h>
12#include <linux/gpio.h> 13#include <linux/gpio.h>
13#include <linux/mmc/host.h> 14#include <linux/mmc/host.h>
14#include <linux/platform_device.h> 15#include <linux/platform_device.h>
@@ -503,6 +504,34 @@ static void __init origen_ohci_init(void)
503/* USB OTG */ 504/* USB OTG */
504static struct s3c_hsotg_plat origen_hsotg_pdata; 505static struct s3c_hsotg_plat origen_hsotg_pdata;
505 506
507static struct gpio_led origen_gpio_leds[] = {
508 {
509 .name = "origen::status1",
510 .default_trigger = "heartbeat",
511 .gpio = EXYNOS4_GPX1(3),
512 .active_low = 1,
513 },
514 {
515 .name = "origen::status2",
516 .default_trigger = "mmc0",
517 .gpio = EXYNOS4_GPX1(4),
518 .active_low = 1,
519 },
520};
521
522static struct gpio_led_platform_data origen_gpio_led_info = {
523 .leds = origen_gpio_leds,
524 .num_leds = ARRAY_SIZE(origen_gpio_leds),
525};
526
527static struct platform_device origen_leds_gpio = {
528 .name = "leds-gpio",
529 .id = -1,
530 .dev = {
531 .platform_data = &origen_gpio_led_info,
532 },
533};
534
506static struct gpio_keys_button origen_gpio_keys_table[] = { 535static struct gpio_keys_button origen_gpio_keys_table[] = {
507 { 536 {
508 .code = KEY_MENU, 537 .code = KEY_MENU,
@@ -682,6 +711,7 @@ static struct platform_device *origen_devices[] __initdata = {
682 &exynos4_device_ohci, 711 &exynos4_device_ohci,
683 &origen_device_gpiokeys, 712 &origen_device_gpiokeys,
684 &origen_lcd_hv070wsa, 713 &origen_lcd_hv070wsa,
714 &origen_leds_gpio,
685 &origen_device_bluetooth, 715 &origen_device_bluetooth,
686}; 716};
687 717