mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
68 lines
1.8 KiB
Diff
68 lines
1.8 KiB
Diff
From 564ac4b9d7da4cc8e6fdca33ca45d19649dc3366 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
|
|
Date: Wed, 7 Mar 2012 23:24:54 +0100
|
|
Subject: [PATCH] mx53_loco: add USR led support
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Eric Bénard <eric@eukrea.com>
|
|
---
|
|
arch/arm/mach-mx5/mx53_loco.c | 27 +++++++++++++++++++++++++++
|
|
1 files changed, 27 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/arch/arm/mach-mx5/mx53_loco.c b/arch/arm/mach-mx5/mx53_loco.c
|
|
index c8417da..c91952b 100644
|
|
--- a/arch/arm/mach-mx5/mx53_loco.c
|
|
+++ b/arch/arm/mach-mx5/mx53_loco.c
|
|
@@ -835,6 +835,28 @@ static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags,
|
|
}
|
|
}
|
|
|
|
+static struct gpio_led gpio_leds[] = {
|
|
+ {
|
|
+ .name = "USR",
|
|
+ .default_trigger = "heartbeat",
|
|
+ .active_low = 0,
|
|
+ .gpio = USER_LED_EN,
|
|
+ },
|
|
+};
|
|
+
|
|
+static struct gpio_led_platform_data gpio_led_info = {
|
|
+ .leds = gpio_leds,
|
|
+ .num_leds = ARRAY_SIZE(gpio_leds),
|
|
+};
|
|
+
|
|
+static struct platform_device leds_gpio = {
|
|
+ .name = "leds-gpio",
|
|
+ .id = -1,
|
|
+ .dev = {
|
|
+ .platform_data = &gpio_led_info,
|
|
+ },
|
|
+};
|
|
+
|
|
static void __init mx53_loco_io_init(void)
|
|
{
|
|
mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads,
|
|
@@ -865,6 +887,10 @@ static void __init mx53_loco_io_init(void)
|
|
gpio_request(DISP0_POWER_EN, "disp0-power-en");
|
|
gpio_direction_output(DISP0_POWER_EN, 1);
|
|
|
|
+ /* USR LED */
|
|
+ gpio_request(USER_LED_EN, "user-led-en");
|
|
+ gpio_direction_output(USER_LED_EN, 1);
|
|
+ gpio_free(USER_LED_EN);
|
|
}
|
|
|
|
/*!
|
|
@@ -979,6 +1005,7 @@ static void __init mxc_board_init(void)
|
|
loco_add_device_buttons();
|
|
pm_power_off = da9053_power_off;
|
|
pm_i2c_init(I2C1_BASE_ADDR - MX53_OFFSET);
|
|
+ platform_device_register(&leds_gpio);
|
|
}
|
|
|
|
static void __init mx53_loco_timer_init(void)
|
|
--
|
|
1.7.7.6
|
|
|