From 1b41bdf68a72c1fd506ee3dbfbf954fd2eaef75c Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Wed, 23 Jan 2008 09:32:17 +0100 Subject: [ARM] 4761/1: [AT91] Board-support for NEW_LEDs Add NEW_LEDs support for the following boards: - Cogent CSB337 - Atmel AT91RM9200-DK - Atmel AT91RM9200-EK - Atmel AT91SAM9263-EK Mostly based on patch from David Brownell. Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-at91/board-csb337.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'arch/arm/mach-at91/board-csb337.c') diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 51cb3c8cc601..0e2a11fc5bbd 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c @@ -215,6 +215,28 @@ static void __init csb300_add_device_buttons(void) static void __init csb300_add_device_buttons(void) {} #endif +static struct gpio_led csb_leds[] = { + { /* "led0", yellow */ + .name = "led0", + .gpio = AT91_PIN_PB2, + .active_low = 1, + .default_trigger = "heartbeat", + }, + { /* "led1", green */ + .name = "led1", + .gpio = AT91_PIN_PB1, + .active_low = 1, + .default_trigger = "mmc0", + }, + { /* "led2", yellow */ + .name = "led2", + .gpio = AT91_PIN_PB0, + .active_low = 1, + .default_trigger = "ide-disk", + }, +}; + + static void __init csb337_board_init(void) { /* Serial */ @@ -236,6 +258,8 @@ static void __init csb337_board_init(void) at91_add_device_mmc(0, &csb337_mmc_data); /* NOR flash */ platform_device_register(&csb_flash); + /* LEDs */ + at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); /* Switches on CSB300 */ csb300_add_device_buttons(); } -- cgit v1.2.3