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>
This commit is contained in:
Mike Rapoport
2011-04-25 01:09:06 +03:00
committed by Tony Lindgren
parent 96974a249b
commit fbd8071c18
21 changed files with 78 additions and 232 deletions

View File

@@ -366,19 +366,9 @@ static struct twl4030_platform_data devkit8000_twldata = {
.keypad = &devkit8000_kp_data,
};
static struct i2c_board_info __initdata devkit8000_i2c_boardinfo[] = {
{
I2C_BOARD_INFO("tps65930", 0x48),
.flags = I2C_CLIENT_WAKE,
.irq = INT_34XX_SYS_NIRQ,
.platform_data = &devkit8000_twldata,
},
};
static int __init devkit8000_i2c_init(void)
{
omap_register_i2c_bus(1, 2600, devkit8000_i2c_boardinfo,
ARRAY_SIZE(devkit8000_i2c_boardinfo));
omap3_pmic_init("tps65930", &devkit8000_twldata);
/* Bus 3 is attached to the DVI port where devices like the pico DLP
* projector don't work reliably with 400kHz */
omap_register_i2c_bus(3, 400, NULL, 0);