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:

committed by
Tony Lindgren

parent
96974a249b
commit
fbd8071c18
@@ -31,6 +31,7 @@
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
#include "sdram-nokia.h"
|
||||
#include "common-board-devices.h"
|
||||
|
||||
static struct regulator_consumer_supply rm680_vemmc_consumers[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
|
||||
@@ -90,19 +91,9 @@ static struct twl4030_platform_data rm680_twl_data = {
|
||||
/* add rest of the children here */
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata rm680_twl_i2c_board_info[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("twl5031", 0x48),
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
.irq = INT_34XX_SYS_NIRQ,
|
||||
.platform_data = &rm680_twl_data,
|
||||
},
|
||||
};
|
||||
|
||||
static void __init rm680_i2c_init(void)
|
||||
{
|
||||
omap_register_i2c_bus(1, 2900, rm680_twl_i2c_board_info,
|
||||
ARRAY_SIZE(rm680_twl_i2c_board_info));
|
||||
omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user