summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch')
-rw-r--r--meta/recipes-kernel/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch b/meta/recipes-kernel/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch
new file mode 100644
index 0000000000..17329be29b
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-omap2-git/omap3evm/0001-omap3beagle-add-a-platform-device-to-hook-up-the-GP.patch
@@ -0,0 +1,69 @@
1From 7a444ee080c5f1a62ac5042f1e7926622b3e1ce7 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@openembedded.org>
3Date: Fri, 30 May 2008 13:43:36 +0200
4Subject: [PATCH] ARM: OMAP: omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
5
6omap3beagle: 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.
8
9Signed-off-by: Koen Kooi <koen@openembedded.org>
10---
11 arch/arm/mach-omap2/board-omap3beagle.c | 28 ++++++++++++++++++++++++++++
12 1 files changed, 28 insertions(+), 0 deletions(-)
13
14diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
15index c992cc7..83891fc 100644
16--- a/arch/arm/mach-omap2/board-omap3beagle.c
17+++ b/arch/arm/mach-omap2/board-omap3beagle.c
18@@ -19,6 +19,7 @@
19 #include <linux/err.h>
20 #include <linux/clk.h>
21 #include <linux/io.h>
22+#include <linux/leds.h>
23
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",
28 };
29
30+struct gpio_led gpio_leds[] = {
31+ {
32+ .name = "beagleboard::led0",
33+ .default_trigger = "none",
34+ .gpio = 149,
35+ },
36+ {
37+ .name = "beagleboard::led1",
38+ .default_trigger = "none",
39+ .gpio = 150,
40+ },
41+};
42+
43+static struct gpio_led_platform_data gpio_led_info = {
44+ .leds = gpio_leds,
45+ .num_leds = ARRAY_SIZE(gpio_leds),
46+};
47+
48+static struct platform_device leds_gpio = {
49+ .name = "leds-gpio",
50+ .id = -1,
51+ .dev = {
52+ .platform_data = &gpio_led_info,
53+ },
54+};
55+
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,
62 #endif
63+ &leds_gpio,
64 };
65
66 static void __init omap3_beagle_init(void)
67--
681.5.4.3
69