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-omap3beagle.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-omap3beagle.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 33007fd4a08..13a16649d42 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include "hsmmc.h" | 52 | #include "hsmmc.h" |
53 | #include "timer-gp.h" | 53 | #include "timer-gp.h" |
54 | #include "pm.h" | 54 | #include "pm.h" |
55 | #include "common-board-devices.h" | ||
55 | 56 | ||
56 | #define NAND_BLOCK_SIZE SZ_128K | 57 | #define NAND_BLOCK_SIZE SZ_128K |
57 | 58 | ||
@@ -453,15 +454,6 @@ static struct twl4030_platform_data beagle_twldata = { | |||
453 | .vpll2 = &beagle_vpll2, | 454 | .vpll2 = &beagle_vpll2, |
454 | }; | 455 | }; |
455 | 456 | ||
456 | static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { | ||
457 | { | ||
458 | I2C_BOARD_INFO("twl4030", 0x48), | ||
459 | .flags = I2C_CLIENT_WAKE, | ||
460 | .irq = INT_34XX_SYS_NIRQ, | ||
461 | .platform_data = &beagle_twldata, | ||
462 | }, | ||
463 | }; | ||
464 | |||
465 | static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { | 457 | static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { |
466 | { | 458 | { |
467 | I2C_BOARD_INFO("eeprom", 0x50), | 459 | I2C_BOARD_INFO("eeprom", 0x50), |
@@ -470,8 +462,7 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { | |||
470 | 462 | ||
471 | static int __init omap3_beagle_i2c_init(void) | 463 | static int __init omap3_beagle_i2c_init(void) |
472 | { | 464 | { |
473 | omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, | 465 | omap3_pmic_init("twl4030", &beagle_twldata); |
474 | ARRAY_SIZE(beagle_i2c_boardinfo)); | ||
475 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | 466 | /* Bus 3 is attached to the DVI port where devices like the pico DLP |
476 | * projector don't work reliably with 400kHz */ | 467 | * projector don't work reliably with 400kHz */ |
477 | omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); | 468 | omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); |