mfd: Adopt mfd_data in 88pm860x regulator

Copy 88pm860x platform data into different mfd_data structure for
regulator driver. So move the identification of device node from
regulator driver to mfd driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Haojian Zhuang
2011-03-07 23:43:11 +08:00
committed by Samuel Ortiz
parent 3154c34469
commit 22aad0011e
3 changed files with 133 additions and 87 deletions

View File

@ -131,9 +131,11 @@ enum {
PM8607_ID_LDO8,
PM8607_ID_LDO9,
PM8607_ID_LDO10,
PM8607_ID_LDO11,
PM8607_ID_LDO12,
PM8607_ID_LDO13,
PM8607_ID_LDO14,
PM8607_ID_LDO15,
PM8607_ID_RG_MAX,
};
@ -310,8 +312,6 @@ struct pm860x_chip {
};
#define PM8607_MAX_REGULATOR PM8607_ID_RG_MAX /* 3 Bucks, 13 LDOs */
enum {
GI2C_PORT = 0,
PI2C_PORT,
@ -351,6 +351,7 @@ struct pm860x_platform_data {
struct pm860x_led_pdata *led;
struct pm860x_touch_pdata *touch;
struct pm860x_power_pdata *power;
struct regulator_init_data *regulator;
unsigned short companion_addr; /* I2C address of companion chip */
int i2c_port; /* Controlled by GI2C or PI2C */
@ -358,7 +359,7 @@ struct pm860x_platform_data {
int irq_base; /* IRQ base number of 88pm860x */
int num_leds;
int num_backlights;
struct regulator_init_data *regulator[PM8607_MAX_REGULATOR];
int num_regulators;
};
extern int pm860x_reg_read(struct i2c_client *, int);