mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-27 14:28:05 +00:00
7b09dfe646
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
120 lines
3.1 KiB
Diff
120 lines
3.1 KiB
Diff
From f4d66b3ee9bbe36e17f9aaee2aedfa547e7bbb8c Mon Sep 17 00:00:00 2001
|
|
From: Koen Kooi <koen@dominion.thruhere.net>
|
|
Date: Wed, 25 Jan 2012 10:04:15 +0100
|
|
Subject: [PATCH 35/35] beaglebone: add structs for DVI cape LEDs
|
|
|
|
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
|
---
|
|
arch/arm/mach-omap2/board-am335xevm.c | 67 +++++++++++++++++++++++++++++---
|
|
1 files changed, 60 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
|
index 9556736..1b398c7 100644
|
|
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
|
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
|
@@ -847,10 +847,45 @@ static struct pinmux_config usb1_pin_mux[] = {
|
|
#define BEAGLEBONE_USR3_LED GPIO_TO_PIN(1, 23)
|
|
#define BEAGLEBONE_USR4_LED GPIO_TO_PIN(1, 24)
|
|
|
|
+static struct gpio_led bone_gpio_leds[] = {
|
|
+ {
|
|
+ .name = "beaglebone::usr0",
|
|
+ .default_trigger = "heartbeat",
|
|
+ .gpio = BEAGLEBONE_USR1_LED,
|
|
+ },
|
|
+ {
|
|
+ .name = "beaglebone::usr1",
|
|
+ .default_trigger = "mmc0",
|
|
+ .gpio = BEAGLEBONE_USR2_LED,
|
|
+ },
|
|
+ {
|
|
+ .name = "beaglebone::usr2",
|
|
+ .gpio = BEAGLEBONE_USR3_LED,
|
|
+ },
|
|
+ {
|
|
+ .name = "beaglebone::usr3",
|
|
+ .gpio = BEAGLEBONE_USR4_LED,
|
|
+ },
|
|
+};
|
|
+
|
|
+static struct gpio_led_platform_data bone_gpio_led_info = {
|
|
+ .leds = bone_gpio_leds,
|
|
+ .num_leds = ARRAY_SIZE(bone_gpio_leds),
|
|
+};
|
|
+
|
|
+static struct platform_device bone_leds_gpio = {
|
|
+ .name = "leds-gpio",
|
|
+ .id = -1,
|
|
+ .dev = {
|
|
+ .platform_data = &bone_gpio_led_info,
|
|
+ },
|
|
+};
|
|
+
|
|
+
|
|
#define BEAGLEBONEDVI_USR0_LED GPIO_TO_PIN(1, 18)
|
|
#define BEAGLEBONEDVI_USR1_LED GPIO_TO_PIN(1, 19)
|
|
|
|
-static struct gpio_led gpio_leds[] = {
|
|
+static struct gpio_led dvi_gpio_leds[] = {
|
|
{
|
|
.name = "beaglebone::usr0",
|
|
.default_trigger = "heartbeat",
|
|
@@ -869,18 +904,28 @@ static struct gpio_led gpio_leds[] = {
|
|
.name = "beaglebone::usr3",
|
|
.gpio = BEAGLEBONE_USR4_LED,
|
|
},
|
|
+ {
|
|
+ .name = "dvi::usr0",
|
|
+ .default_trigger = "heartbeat",
|
|
+ .gpio = BEAGLEBONEDVI_USR0_LED,
|
|
+ },
|
|
+ {
|
|
+ .name = "dvi::usr1",
|
|
+ .default_trigger = "mmc0",
|
|
+ .gpio = BEAGLEBONEDVI_USR1_LED,
|
|
+ },
|
|
};
|
|
|
|
-static struct gpio_led_platform_data gpio_led_info = {
|
|
- .leds = gpio_leds,
|
|
- .num_leds = ARRAY_SIZE(gpio_leds),
|
|
+static struct gpio_led_platform_data dvi_gpio_led_info = {
|
|
+ .leds = dvi_gpio_leds,
|
|
+ .num_leds = ARRAY_SIZE(dvi_gpio_leds),
|
|
};
|
|
|
|
-static struct platform_device leds_gpio = {
|
|
+static struct platform_device dvi_leds_gpio = {
|
|
.name = "leds-gpio",
|
|
.id = -1,
|
|
.dev = {
|
|
- .platform_data = &gpio_led_info,
|
|
+ .platform_data = &dvi_gpio_led_info,
|
|
},
|
|
};
|
|
|
|
@@ -1074,11 +1119,19 @@ static void boneleds_init(int evm_id, int profile )
|
|
{
|
|
int err;
|
|
setup_pin_mux(bone_pin_mux);
|
|
- err = platform_device_register(&leds_gpio);
|
|
+ err = platform_device_register(&bone_leds_gpio);
|
|
if (err)
|
|
pr_err("failed to register BeagleBone LEDS\n");
|
|
}
|
|
|
|
+static void dvileds_init(int evm_id, int profile )
|
|
+{
|
|
+ int err;
|
|
+ err = platform_device_register(&dvi_leds_gpio);
|
|
+ if (err)
|
|
+ pr_err("failed to register BeagleBone DVI cape LEDS\n");
|
|
+}
|
|
+
|
|
static void rgmii1_init(int evm_id, int profile)
|
|
{
|
|
setup_pin_mux(rgmii1_pin_mux);
|
|
--
|
|
1.7.2.5
|
|
|