summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9-l9260.c
diff options
context:
space:
mode:
authorBryan Wu <bryan.wu@canonical.com>2012-03-13 17:47:33 +0800
committerBryan Wu <bryan.wu@canonical.com>2012-07-31 21:23:32 +0800
commitd61015fad9703990e4b0c826ed943b13794f19c8 (patch)
treee2b69735592d36feb61b8543be92ccab8474c5b9 /arch/arm/mach-at91/board-sam9-l9260.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-sam9-l9260.c')
-rw-r--r--arch/arm/mach-at91/board-sam9-l9260.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
index cdd21f2595d..ef982f8f71c 100644
--- a/arch/arm/mach-at91/board-sam9-l9260.c
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -165,11 +165,26 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
.vcc_pin = -EINVAL,
};
+/*
+ * LEDs
+ */
+static struct gpio_led ek_leds[] = {
+ { /* D1 */
+ .name = "led1",
+ .gpio = AT91_PIN_PA9,
+ .active_low = 1,
+ .default_trigger = "heartbeat",
+ },
+ { /* D2 */
+ .name = "led2",
+ .gpio = AT91_PIN_PA6,
+ .active_low = 1,
+ .default_trigger = "timer",
+ }
+};
+
static void __init ek_board_init(void)
{
- /* Setup the LEDs */
- at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
-
/* Serial */
/* DBGU on ttyS0. (Rx & Tx only) */
at91_register_uart(0, 0, 0);
@@ -196,6 +211,8 @@ static void __init ek_board_init(void)
at91_add_device_mmc(0, &ek_mmc_data);
/* I2C */
at91_add_device_i2c(NULL, 0);
+ /* LEDs */
+ at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
}
MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260")