]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-2430sdp.c
twl4030: board init updates
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-2430sdp.c
index 4a48adf333495e6a31b00f794218b6fa88828fb7..3649a9402bcf1b0773ab4dc69fca30a8c1c986c7 100644 (file)
@@ -353,14 +353,25 @@ static struct omap_board_config_kernel sdp2430_config[] __initdata = {
        {OMAP_TAG_SERIAL_CONSOLE, &sdp2430_serial_console_config},
 };
 
+static struct twl4030_platform_data sdp2430_twldata = {
+       .irq_base       = TWL4030_IRQ_BASE,
+       .irq_end        = TWL4030_IRQ_END,
+};
+
+static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = {
+       {
+               I2C_BOARD_INFO("twl4030", 0x48),
+               .flags = I2C_CLIENT_WAKE,
+               .irq = INT_24XX_SYS_NIRQ,
+               .platform_data = &sdp2430_twldata,
+       },
+};
+
 static int __init omap2430_i2c_init(void)
 {
-       /*
-        * Registering bus 2 first to avoid twl4030 misbehaving as 2430SDP
-        * has twl4030 on bus 2
-        */
-       omap_register_i2c_bus(2, 2600, NULL, 0);
        omap_register_i2c_bus(1, 400, NULL, 0);
+       omap_register_i2c_bus(2, 2600, sdp2430_i2c_boardinfo,
+                       ARRAY_SIZE(sdp2430_i2c_boardinfo));
        return 0;
 }