aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-eco920.c
diff options
context:
space:
mode:
authorBryan Wu <bryan.wu@canonical.com>2012-03-13 05:47:33 -0400
committerBryan Wu <bryan.wu@canonical.com>2012-07-31 09:23:32 -0400
commitd61015fad9703990e4b0c826ed943b13794f19c8 (patch)
treee2b69735592d36feb61b8543be92ccab8474c5b9 /arch/arm/mach-at91/board-eco920.c
parent8f88731d052d2b14f332249a9332690ac1b365ac (diff)
ARM: at91: convert old leds drivers to gpio_led and led_trigger drivers
Build with at91 defconfigs successfully Signed-off-by: Bryan Wu <bryan.wu@canonical.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/board-eco920.c')
-rw-r--r--arch/arm/mach-at91/board-eco920.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
index 558546cf63f4..76cc82632ab5 100644
--- a/arch/arm/mach-at91/board-eco920.c
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -92,10 +92,26 @@ static struct spi_board_info eco920_spi_devices[] = {
92 }, 92 },
93}; 93};
94 94
95/*
96 * LEDs
97 */
98static struct gpio_led eco920_leds[] = {
99 { /* D1 */
100 .name = "led1",
101 .gpio = AT91_PIN_PB0,
102 .active_low = 1,
103 .default_trigger = "heartbeat",
104 },
105 { /* D2 */
106 .name = "led2",
107 .gpio = AT91_PIN_PB1,
108 .active_low = 1,
109 .default_trigger = "timer",
110 }
111};
112
95static void __init eco920_board_init(void) 113static void __init eco920_board_init(void)
96{ 114{
97 /* Setup the LEDs */
98 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
99 /* DBGU on ttyS0. (Rx & Tx only */ 115 /* DBGU on ttyS0. (Rx & Tx only */
100 at91_register_uart(0, 0, 0); 116 at91_register_uart(0, 0, 0);
101 at91_add_device_serial(); 117 at91_add_device_serial();
@@ -126,6 +142,8 @@ static void __init eco920_board_init(void)
126 ); 142 );
127 143
128 at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices)); 144 at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices));
145 /* LEDs */
146 at91_gpio_leds(eco920_leds, ARRAY_SIZE(eco920_leds));
129} 147}
130 148
131MACHINE_START(ECO920, "eco920") 149MACHINE_START(ECO920, "eco920")