1 From 7a444ee080c5f1a62ac5042f1e7926622b3e1ce7 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@openembedded.org>
3 Date: Fri, 30 May 2008 13:43:36 +0200
4 Subject: [PATCH] ARM: OMAP: omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
6 omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
7 * on revision A5 and earlier board the two leds can't be controlled seperately, should be fixed in rev. B and C boards.
9 Signed-off-by: Koen Kooi <koen@openembedded.org>
11 arch/arm/mach-omap2/board-omap3beagle.c | 28 ++++++++++++++++++++++++++++
12 1 files changed, 28 insertions(+), 0 deletions(-)
14 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
15 index c992cc7..83891fc 100644
16 --- a/arch/arm/mach-omap2/board-omap3beagle.c
17 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
19 #include <linux/err.h>
20 #include <linux/clk.h>
22 +#include <linux/leds.h>
24 #include <asm/hardware.h>
25 #include <asm/mach-types.h>
26 @@ -72,6 +73,32 @@ static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
27 .ctrl_name = "internal",
30 +struct gpio_led gpio_leds[] = {
32 + .name = "beagleboard::led0",
33 + .default_trigger = "none",
37 + .name = "beagleboard::led1",
38 + .default_trigger = "none",
43 +static struct gpio_led_platform_data gpio_led_info = {
45 + .num_leds = ARRAY_SIZE(gpio_leds),
48 +static struct platform_device leds_gpio = {
49 + .name = "leds-gpio",
52 + .platform_data = &gpio_led_info,
56 static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
57 { OMAP_TAG_UART, &omap3_beagle_uart_config },
58 { OMAP_TAG_MMC, &omap3beagle_mmc_config },
59 @@ -83,6 +110,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = {
60 #ifdef CONFIG_RTC_DRV_TWL4030
61 &omap3_beagle_twl4030rtc_device,
66 static void __init omap3_beagle_init(void)