diff options
author | Bryan Wu <bryan.wu@canonical.com> | 2012-03-13 05:47:33 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-07-31 09:23:32 -0400 |
commit | d61015fad9703990e4b0c826ed943b13794f19c8 (patch) | |
tree | e2b69735592d36feb61b8543be92ccab8474c5b9 /arch/arm/mach-at91/board-ecbat91.c | |
parent | 8f88731d052d2b14f332249a9332690ac1b365ac (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-ecbat91.c')
-rw-r--r-- | arch/arm/mach-at91/board-ecbat91.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 89cc3726a9ce..f9a4ab93b152 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c | |||
@@ -137,11 +137,20 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = { | |||
137 | }, | 137 | }, |
138 | }; | 138 | }; |
139 | 139 | ||
140 | /* | ||
141 | * LEDs | ||
142 | */ | ||
143 | static struct gpio_led ecb_leds[] = { | ||
144 | { /* D1 */ | ||
145 | .name = "led1", | ||
146 | .gpio = AT91_PIN_PC7, | ||
147 | .active_low = 1, | ||
148 | .default_trigger = "heartbeat", | ||
149 | } | ||
150 | }; | ||
151 | |||
140 | static void __init ecb_at91board_init(void) | 152 | static void __init ecb_at91board_init(void) |
141 | { | 153 | { |
142 | /* Setup the LEDs */ | ||
143 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); | ||
144 | |||
145 | /* Serial */ | 154 | /* Serial */ |
146 | /* DBGU on ttyS0. (Rx & Tx only) */ | 155 | /* DBGU on ttyS0. (Rx & Tx only) */ |
147 | at91_register_uart(0, 0, 0); | 156 | at91_register_uart(0, 0, 0); |
@@ -164,6 +173,9 @@ static void __init ecb_at91board_init(void) | |||
164 | 173 | ||
165 | /* SPI */ | 174 | /* SPI */ |
166 | at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices)); | 175 | at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices)); |
176 | |||
177 | /* LEDs */ | ||
178 | at91_gpio_leds(ecb_leds, ARRAY_SIZE(ecb_leds)); | ||
167 | } | 179 | } |
168 | 180 | ||
169 | MACHINE_START(ECBAT91, "emQbit's ECB_AT91") | 181 | MACHINE_START(ECBAT91, "emQbit's ECB_AT91") |