aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-sa1100/lart.c
diff options
context:
space:
mode:
authorBryan Wu <bryan.wu@canonical.com>2012-03-14 02:22:03 +0800
committerBryan Wu <bryan.wu@canonical.com>2012-08-01 11:22:14 +0800
commit18775a7bea8fbbebe8818db7a64aaeb40b40a0c5 (patch)
tree6f47d6a4147a6505da85cf4126254bdccc458842 /arch/arm/mach-sa1100/lart.c
parentdafbeadf4a9e1b2765641b687e3343be76d2eacd (diff)
ARM: mach-sa1100: retire custom LED code
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'arch/arm/mach-sa1100/lart.c')
-rw-r--r--arch/arm/mach-sa1100/lart.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c
index b775a0abec0a..b2ce04bf4c9b 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -5,6 +5,9 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/tty.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+#include <linux/platform_device.h>
#include <video/sa1100fb.h>
@@ -126,6 +129,27 @@ static struct map_desc lart_io_desc[] __initdata = {
}
};
+/* LEDs */
+struct gpio_led lart_gpio_leds[] = {
+ {
+ .name = "lart:red",
+ .default_trigger = "cpu0",
+ .gpio = 23,
+ },
+};
+
+static struct gpio_led_platform_data lart_gpio_led_info = {
+ .leds = lart_gpio_leds,
+ .num_leds = ARRAY_SIZE(lart_gpio_leds),
+};
+
+static struct platform_device lart_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &lart_gpio_led_info,
+ }
+};
static void __init lart_map_io(void)
{
sa1100_map_io();
@@ -139,6 +163,8 @@ static void __init lart_map_io(void)
GPDR |= GPIO_UART_TXD;
GPDR &= ~GPIO_UART_RXD;
PPAR |= PPAR_UPR;
+
+ platform_device_register(&lart_leds);
}
MACHINE_START(LART, "LART")