diff options
author | Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> | 2011-12-19 20:40:36 -0200 |
---|---|---|
committer | Angus Ainslie <angus.ainslie@linaro.org> | 2011-12-20 07:10:45 -0700 |
commit | 682bdc6876696de79b7ad4443a3c7f11ba9efc6a (patch) | |
tree | 24e5510e9ddcd48d40138a3bffae632056e391a1 | |
parent | 22840374d142c76e3467e8ec50aa94504e915489 (diff) |
exynos: mach-origen: adding leds status1 and status2linux-release-2011-12.1
At Origen 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>
-rw-r--r-- | arch/arm/mach-exynos/mach-origen.c | 30 |
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 6009a373724..792b6d249ff 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -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> @@ -615,6 +616,34 @@ static void __init origen_otg_init(void) s5p_otg_set_platdata(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, @@ -771,6 +800,7 @@ static struct platform_device *origen_devices[] __initdata = { &exynos4_device_pd[PD_CAM], &exynos4_device_pd[PD_GPS], &exynos4_device_pd[PD_MFC], + &origen_leds_gpio, &origen_device_gpiokeys, &origen_lcd_hv070wsa, &origen_device_bluetooth, |