aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorAndrew Victor <linux@maxim.org.za>2008-04-02 17:20:45 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-04 04:52:28 -0400
commit5b7659d190fff2d69faec07314a51ba708f1f1ce (patch)
tree60b1a50659ad263cf1069009349ddb1eb1dab2a1 /arch/arm/mach-at91
parent5e9df924dd51beaf007ffba42b5deb47e1c6249b (diff)
[ARM] 4911/1: [AT91] LEDs on SAM9260-EK and SAM9261-EK boards
Add support for the GPIO-driven LEDs (using NEW_LEDS) on the Atmel SAM9260-EK and SAM9261-EK boards. Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com> Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c20
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c25
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c2
3 files changed, 46 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index 40c3e95690a9..4d1d9c777084 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -204,6 +204,24 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
204// .vcc_pin = ... not connected 204// .vcc_pin = ... not connected
205}; 205};
206 206
207
208/*
209 * LEDs
210 */
211static struct gpio_led ek_leds[] = {
212 { /* "bottom" led, green, userled1 to be defined */
213 .name = "ds5",
214 .gpio = AT91_PIN_PA6,
215 .active_low = 1,
216 .default_trigger = "none",
217 },
218 { /* "power" led, yellow */
219 .name = "ds1",
220 .gpio = AT91_PIN_PA9,
221 .default_trigger = "heartbeat",
222 }
223};
224
207static void __init ek_board_init(void) 225static void __init ek_board_init(void)
208{ 226{
209 /* Serial */ 227 /* Serial */
@@ -225,6 +243,8 @@ static void __init ek_board_init(void)
225 /* SSC (to AT73C213) */ 243 /* SSC (to AT73C213) */
226 at73c213_set_clk(&at73c213_data); 244 at73c213_set_clk(&at73c213_data);
227 at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX); 245 at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
246 /* LEDs */
247 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
228} 248}
229 249
230MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") 250MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index ce512d74e6e9..08382c0df221 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -487,6 +487,29 @@ static void __init ek_add_device_buttons(void)
487static void __init ek_add_device_buttons(void) {} 487static void __init ek_add_device_buttons(void) {}
488#endif 488#endif
489 489
490/*
491 * LEDs
492 */
493static struct gpio_led ek_leds[] = {
494 { /* "bottom" led, green, userled1 to be defined */
495 .name = "ds7",
496 .gpio = AT91_PIN_PA14,
497 .active_low = 1,
498 .default_trigger = "none",
499 },
500 { /* "top" led, green, userled2 to be defined */
501 .name = "ds8",
502 .gpio = AT91_PIN_PA13,
503 .active_low = 1,
504 .default_trigger = "none",
505 },
506 { /* "power" led, yellow */
507 .name = "ds1",
508 .gpio = AT91_PIN_PA23,
509 .default_trigger = "heartbeat",
510 }
511};
512
490static void __init ek_board_init(void) 513static void __init ek_board_init(void)
491{ 514{
492 /* Serial */ 515 /* Serial */
@@ -519,6 +542,8 @@ static void __init ek_board_init(void)
519 at91_add_device_lcdc(&ek_lcdc_data); 542 at91_add_device_lcdc(&ek_lcdc_data);
520 /* Push Buttons */ 543 /* Push Buttons */
521 ek_add_device_buttons(); 544 ek_add_device_buttons();
545 /* LEDs */
546 at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
522} 547}
523 548
524MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") 549MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 86a7fb17096c..b4cd5d0ed597 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -336,7 +336,7 @@ static struct gpio_led ek_leds[] = {
336 .name = "ds3", 336 .name = "ds3",
337 .gpio = AT91_PIN_PB7, 337 .gpio = AT91_PIN_PB7,
338 .default_trigger = "heartbeat", 338 .default_trigger = "heartbeat",
339 }, 339 }
340}; 340};
341 341
342 342