diff options
author | Mike Rapoport <mike@compulab.co.il> | 2011-04-24 18:09:06 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-05-03 05:51:45 -0400 |
commit | fbd8071c188e3053fb318d78214e54d4615d93f2 (patch) | |
tree | f95630f09350122e503701e8c4af14fec2b978a6 /arch/arm/mach-omap2/board-igep0020.c | |
parent | 96974a249b0cf3537f49115a59be67e2c54f315c (diff) |
omap: use common initialization for PMIC i2c bus
Introduce omap_pmic_init that registers i2c bus and PMIC device on that
bus and add omap2/3/4 wrappers for common cases.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-igep0020.c')
-rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 5b9bde74b6b..a0fd10e42b3 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "mux.h" | 38 | #include "mux.h" |
39 | #include "hsmmc.h" | 39 | #include "hsmmc.h" |
40 | #include "sdram-numonyx-m65kxxxxam.h" | 40 | #include "sdram-numonyx-m65kxxxxam.h" |
41 | #include "common-board-devices.h" | ||
41 | 42 | ||
42 | #define IGEP2_SMSC911X_CS 5 | 43 | #define IGEP2_SMSC911X_CS 5 |
43 | #define IGEP2_SMSC911X_GPIO 176 | 44 | #define IGEP2_SMSC911X_GPIO 176 |
@@ -536,15 +537,6 @@ static struct twl4030_platform_data igep2_twldata = { | |||
536 | .vio = &igep2_vio, | 537 | .vio = &igep2_vio, |
537 | }; | 538 | }; |
538 | 539 | ||
539 | static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = { | ||
540 | { | ||
541 | I2C_BOARD_INFO("twl4030", 0x48), | ||
542 | .flags = I2C_CLIENT_WAKE, | ||
543 | .irq = INT_34XX_SYS_NIRQ, | ||
544 | .platform_data = &igep2_twldata, | ||
545 | }, | ||
546 | }; | ||
547 | |||
548 | static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = { | 540 | static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = { |
549 | { | 541 | { |
550 | I2C_BOARD_INFO("eeprom", 0x50), | 542 | I2C_BOARD_INFO("eeprom", 0x50), |
@@ -555,10 +547,7 @@ static void __init igep2_i2c_init(void) | |||
555 | { | 547 | { |
556 | int ret; | 548 | int ret; |
557 | 549 | ||
558 | ret = omap_register_i2c_bus(1, 2600, igep2_i2c1_boardinfo, | 550 | omap3_pmic_init("twl4030", &igep2_twldata); |
559 | ARRAY_SIZE(igep2_i2c1_boardinfo)); | ||
560 | if (ret) | ||
561 | pr_warning("IGEP2: Could not register I2C1 bus (%d)\n", ret); | ||
562 | 551 | ||
563 | /* | 552 | /* |
564 | * Bus 3 is attached to the DVI port where devices like the pico DLP | 553 | * Bus 3 is attached to the DVI port where devices like the pico DLP |