]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-omap3beagle.c
twl4030: board init updates
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-omap3beagle.c
index 70562f25a4942f3e8bbdf5e86492a15ee52c096c..fa8f5f64e3e95d059b226fa98b7e5267d11363a5 100644 (file)
@@ -24,6 +24,8 @@
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 
+#include <linux/i2c/twl4030.h>
+
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/nand.h>
@@ -108,9 +110,24 @@ static struct omap_uart_config omap3_beagle_uart_config __initdata = {
        .enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
 };
 
+static struct twl4030_platform_data beagle_twldata = {
+       .irq_base       = TWL4030_IRQ_BASE,
+       .irq_end        = TWL4030_IRQ_END,
+};
+
+static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
+       {
+               I2C_BOARD_INFO("twl4030", 0x48),
+               .flags = I2C_CLIENT_WAKE,
+               .irq = INT_34XX_SYS_NIRQ,
+               .platform_data = &beagle_twldata,
+       },
+};
+
 static int __init omap3_beagle_i2c_init(void)
 {
-       omap_register_i2c_bus(1, 2600, NULL, 0);
+       omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo,
+                       ARRAY_SIZE(beagle_i2c_boardinfo));
 #ifdef CONFIG_I2C2_OMAP_BEAGLE
        omap_register_i2c_bus(2, 400, NULL, 0);
 #endif