]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[ARM] 4938/1: [CSB637] Convert heartbeat LED to gpio-leds
authorBill Gatliff <bgat@billgatliff.com>
Tue, 8 Apr 2008 01:57:03 +0000 (02:57 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 10 Apr 2008 13:59:58 +0000 (14:59 +0100)
Converts the D1/PB2 LED to use the gpio-leds API and heartbeat trigger.

Signed-off-by: Bill Gatliff <bgat@billgatliff.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-at91/board-csb637.c

index 26cda4301674c76f2833241408fe5142fda6b260..419fd19b620b9bbfb92bc4517d58e28f3682c213 100644 (file)
@@ -45,9 +45,6 @@ static void __init csb637_map_io(void)
        /* Initialize processor: 3.6864 MHz crystal */
        at91rm9200_initialize(3686400, AT91RM9200_BGA);
 
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
-
        /* DBGU on ttyS0 */
        at91_register_uart(0, 0, 0);
 
@@ -110,8 +107,19 @@ static struct platform_device csb_flash = {
        .num_resources  = ARRAY_SIZE(csb_flash_resources),
 };
 
+static struct gpio_led csb_leds[] = {
+       {       /* "d1", red */
+               .name                   = "d1",
+               .gpio                   = AT91_PIN_PB2,
+               .active_low             = 1,
+               .default_trigger        = "heartbeat",
+       },
+};
+
 static void __init csb637_board_init(void)
 {
+       /* LED(s) */
+       at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
        /* Serial */
        at91_add_device_serial();
        /* Ethernet */