[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>
This commit is contained in:
parent
5e9df924dd
commit
5b7659d190
|
@ -204,6 +204,24 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
|
||||||
// .vcc_pin = ... not connected
|
// .vcc_pin = ... not connected
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* LEDs
|
||||||
|
*/
|
||||||
|
static struct gpio_led ek_leds[] = {
|
||||||
|
{ /* "bottom" led, green, userled1 to be defined */
|
||||||
|
.name = "ds5",
|
||||||
|
.gpio = AT91_PIN_PA6,
|
||||||
|
.active_low = 1,
|
||||||
|
.default_trigger = "none",
|
||||||
|
},
|
||||||
|
{ /* "power" led, yellow */
|
||||||
|
.name = "ds1",
|
||||||
|
.gpio = AT91_PIN_PA9,
|
||||||
|
.default_trigger = "heartbeat",
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static void __init ek_board_init(void)
|
static void __init ek_board_init(void)
|
||||||
{
|
{
|
||||||
/* Serial */
|
/* Serial */
|
||||||
|
@ -225,6 +243,8 @@ static void __init ek_board_init(void)
|
||||||
/* SSC (to AT73C213) */
|
/* SSC (to AT73C213) */
|
||||||
at73c213_set_clk(&at73c213_data);
|
at73c213_set_clk(&at73c213_data);
|
||||||
at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
|
at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
|
||||||
|
/* LEDs */
|
||||||
|
at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
|
MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
|
||||||
|
|
|
@ -487,6 +487,29 @@ static void __init ek_add_device_buttons(void)
|
||||||
static void __init ek_add_device_buttons(void) {}
|
static void __init ek_add_device_buttons(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* LEDs
|
||||||
|
*/
|
||||||
|
static struct gpio_led ek_leds[] = {
|
||||||
|
{ /* "bottom" led, green, userled1 to be defined */
|
||||||
|
.name = "ds7",
|
||||||
|
.gpio = AT91_PIN_PA14,
|
||||||
|
.active_low = 1,
|
||||||
|
.default_trigger = "none",
|
||||||
|
},
|
||||||
|
{ /* "top" led, green, userled2 to be defined */
|
||||||
|
.name = "ds8",
|
||||||
|
.gpio = AT91_PIN_PA13,
|
||||||
|
.active_low = 1,
|
||||||
|
.default_trigger = "none",
|
||||||
|
},
|
||||||
|
{ /* "power" led, yellow */
|
||||||
|
.name = "ds1",
|
||||||
|
.gpio = AT91_PIN_PA23,
|
||||||
|
.default_trigger = "heartbeat",
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
static void __init ek_board_init(void)
|
static void __init ek_board_init(void)
|
||||||
{
|
{
|
||||||
/* Serial */
|
/* Serial */
|
||||||
|
@ -519,6 +542,8 @@ static void __init ek_board_init(void)
|
||||||
at91_add_device_lcdc(&ek_lcdc_data);
|
at91_add_device_lcdc(&ek_lcdc_data);
|
||||||
/* Push Buttons */
|
/* Push Buttons */
|
||||||
ek_add_device_buttons();
|
ek_add_device_buttons();
|
||||||
|
/* LEDs */
|
||||||
|
at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
|
MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
|
||||||
|
|
|
@ -336,7 +336,7 @@ static struct gpio_led ek_leds[] = {
|
||||||
.name = "ds3",
|
.name = "ds3",
|
||||||
.gpio = AT91_PIN_PB7,
|
.gpio = AT91_PIN_PB7,
|
||||||
.default_trigger = "heartbeat",
|
.default_trigger = "heartbeat",
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue