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-rm680.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-rm680.c')
-rw-r--r-- | arch/arm/mach-omap2/board-rm680.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 2af8b05e786d..8e710ffaec66 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "mux.h" | 31 | #include "mux.h" |
32 | #include "hsmmc.h" | 32 | #include "hsmmc.h" |
33 | #include "sdram-nokia.h" | 33 | #include "sdram-nokia.h" |
34 | #include "common-board-devices.h" | ||
34 | 35 | ||
35 | static struct regulator_consumer_supply rm680_vemmc_consumers[] = { | 36 | static struct regulator_consumer_supply rm680_vemmc_consumers[] = { |
36 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), | 37 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
@@ -90,19 +91,9 @@ static struct twl4030_platform_data rm680_twl_data = { | |||
90 | /* add rest of the children here */ | 91 | /* add rest of the children here */ |
91 | }; | 92 | }; |
92 | 93 | ||
93 | static struct i2c_board_info __initdata rm680_twl_i2c_board_info[] = { | ||
94 | { | ||
95 | I2C_BOARD_INFO("twl5031", 0x48), | ||
96 | .flags = I2C_CLIENT_WAKE, | ||
97 | .irq = INT_34XX_SYS_NIRQ, | ||
98 | .platform_data = &rm680_twl_data, | ||
99 | }, | ||
100 | }; | ||
101 | |||
102 | static void __init rm680_i2c_init(void) | 94 | static void __init rm680_i2c_init(void) |
103 | { | 95 | { |
104 | omap_register_i2c_bus(1, 2900, rm680_twl_i2c_board_info, | 96 | omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); |
105 | ARRAY_SIZE(rm680_twl_i2c_board_info)); | ||
106 | omap_register_i2c_bus(2, 400, NULL, 0); | 97 | omap_register_i2c_bus(2, 400, NULL, 0); |
107 | omap_register_i2c_bus(3, 400, NULL, 0); | 98 | omap_register_i2c_bus(3, 400, NULL, 0); |
108 | } | 99 | } |