]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-at91/board-dk.c
[ARM] 4761/1: [AT91] Board-support for NEW_LEDs
[linux-2.6-omap-h63xx.git] / arch / arm / mach-at91 / board-dk.c
index 6043c38c0a9e84b6063d52111cb9c9b2173b8eb6..0a897efeba8e5321dc8fdfec5da831aa7a554f73 100644 (file)
@@ -124,6 +124,19 @@ static struct spi_board_info dk_spi_devices[] = {
 #endif
 };
 
+static struct i2c_board_info __initdata dk_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("ics1523", 0x26),
+       },
+       {
+               I2C_BOARD_INFO("x9429", 0x28),
+       },
+       {
+               I2C_BOARD_INFO("at24c", 0x50),
+               .type   = "24c1024",
+       }
+};
+
 static struct mtd_partition __initdata dk_nand_partition[] = {
        {
                .name   = "NAND Partition 1",
@@ -132,7 +145,7 @@ static struct mtd_partition __initdata dk_nand_partition[] = {
        },
 };
 
-static struct mtd_partition *nand_partitions(int size, int *num_partitions)
+static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
 {
        *num_partitions = ARRAY_SIZE(dk_nand_partition);
        return dk_nand_partition;
@@ -170,6 +183,14 @@ static struct platform_device dk_flash = {
        .num_resources  = 1,
 };
 
+static struct gpio_led dk_leds[] = {
+       {
+               .name                   = "led0",
+               .gpio                   = AT91_PIN_PB2,
+               .active_low             = 1,
+               .default_trigger        = "heartbeat",
+       }
+};
 
 static void __init dk_board_init(void)
 {
@@ -185,7 +206,7 @@ static void __init dk_board_init(void)
        /* Compact Flash */
        at91_add_device_cf(&dk_cf_data);
        /* I2C */
-       at91_add_device_i2c();
+       at91_add_device_i2c(dk_i2c_devices, ARRAY_SIZE(dk_i2c_devices));
        /* SPI */
        at91_add_device_spi(dk_spi_devices, ARRAY_SIZE(dk_spi_devices));
 #ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
@@ -200,6 +221,8 @@ static void __init dk_board_init(void)
        at91_add_device_nand(&dk_nand_data);
        /* NOR Flash */
        platform_device_register(&dk_flash);
+       /* LEDs */
+       at91_gpio_leds(dk_leds, ARRAY_SIZE(dk_leds));
        /* VGA */
 //     dk_add_device_video();
 }