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-2430sdp.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-2430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-2430sdp.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 1fa6bb896f41..99b3f2de21ff 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -41,6 +41,7 @@ | |||
41 | 41 | ||
42 | #include "mux.h" | 42 | #include "mux.h" |
43 | #include "hsmmc.h" | 43 | #include "hsmmc.h" |
44 | #include "common-board-devices.h" | ||
44 | 45 | ||
45 | #define SDP2430_CS0_BASE 0x04000000 | 46 | #define SDP2430_CS0_BASE 0x04000000 |
46 | #define SECONDARY_LCD_GPIO 147 | 47 | #define SECONDARY_LCD_GPIO 147 |
@@ -180,15 +181,6 @@ static struct twl4030_platform_data sdp2430_twldata = { | |||
180 | .vmmc1 = &sdp2430_vmmc1, | 181 | .vmmc1 = &sdp2430_vmmc1, |
181 | }; | 182 | }; |
182 | 183 | ||
183 | static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = { | ||
184 | { | ||
185 | I2C_BOARD_INFO("twl4030", 0x48), | ||
186 | .flags = I2C_CLIENT_WAKE, | ||
187 | .irq = INT_24XX_SYS_NIRQ, | ||
188 | .platform_data = &sdp2430_twldata, | ||
189 | }, | ||
190 | }; | ||
191 | |||
192 | static struct i2c_board_info __initdata sdp2430_i2c1_boardinfo[] = { | 184 | static struct i2c_board_info __initdata sdp2430_i2c1_boardinfo[] = { |
193 | { | 185 | { |
194 | I2C_BOARD_INFO("isp1301_omap", 0x2D), | 186 | I2C_BOARD_INFO("isp1301_omap", 0x2D), |
@@ -201,8 +193,7 @@ static int __init omap2430_i2c_init(void) | |||
201 | { | 193 | { |
202 | omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, | 194 | omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo, |
203 | ARRAY_SIZE(sdp2430_i2c1_boardinfo)); | 195 | ARRAY_SIZE(sdp2430_i2c1_boardinfo)); |
204 | omap_register_i2c_bus(2, 2600, sdp2430_i2c_boardinfo, | 196 | omap2_pmic_init("twl4030", &sdp2430_twldata); |
205 | ARRAY_SIZE(sdp2430_i2c_boardinfo)); | ||
206 | return 0; | 197 | return 0; |
207 | } | 198 | } |
208 | 199 | ||