diff options
Diffstat (limited to 'arch/arm/mach-sa1100/lart.c')
-rw-r--r-- | arch/arm/mach-sa1100/lart.c | 26 |
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 @@ | |||
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/tty.h> | 7 | #include <linux/tty.h> |
8 | #include <linux/gpio.h> | ||
9 | #include <linux/leds.h> | ||
10 | #include <linux/platform_device.h> | ||
8 | 11 | ||
9 | #include <video/sa1100fb.h> | 12 | #include <video/sa1100fb.h> |
10 | 13 | ||
@@ -126,6 +129,27 @@ static struct map_desc lart_io_desc[] __initdata = { | |||
126 | } | 129 | } |
127 | }; | 130 | }; |
128 | 131 | ||
132 | /* LEDs */ | ||
133 | struct gpio_led lart_gpio_leds[] = { | ||
134 | { | ||
135 | .name = "lart:red", | ||
136 | .default_trigger = "cpu0", | ||
137 | .gpio = 23, | ||
138 | }, | ||
139 | }; | ||
140 | |||
141 | static struct gpio_led_platform_data lart_gpio_led_info = { | ||
142 | .leds = lart_gpio_leds, | ||
143 | .num_leds = ARRAY_SIZE(lart_gpio_leds), | ||
144 | }; | ||
145 | |||
146 | static struct platform_device lart_leds = { | ||
147 | .name = "leds-gpio", | ||
148 | .id = -1, | ||
149 | .dev = { | ||
150 | .platform_data = &lart_gpio_led_info, | ||
151 | } | ||
152 | }; | ||
129 | static void __init lart_map_io(void) | 153 | static void __init lart_map_io(void) |
130 | { | 154 | { |
131 | sa1100_map_io(); | 155 | sa1100_map_io(); |
@@ -139,6 +163,8 @@ static void __init lart_map_io(void) | |||
139 | GPDR |= GPIO_UART_TXD; | 163 | GPDR |= GPIO_UART_TXD; |
140 | GPDR &= ~GPIO_UART_RXD; | 164 | GPDR &= ~GPIO_UART_RXD; |
141 | PPAR |= PPAR_UPR; | 165 | PPAR |= PPAR_UPR; |
166 | |||
167 | platform_device_register(&lart_leds); | ||
142 | } | 168 | } |
143 | 169 | ||
144 | MACHINE_START(LART, "LART") | 170 | MACHINE_START(LART, "LART") |