mfd: Add tps6507x board data structure
Add mfd structure which refrences sub-driver initialization data. For example, for a giving hardware implementation, the voltage regulator sub-driver initialization data provides the mapping betten a voltage regulator and what the output voltage is being used for. Signed-off-by: Todd Fischer <todd.fischer@ridgerun.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:

committed by
Samuel Ortiz

parent
d183fcc975
commit
0bc20bba35
@@ -489,6 +489,7 @@ static int __devinit tps_6507x_probe(struct i2c_client *client,
|
||||
struct regulator_init_data *init_data;
|
||||
struct regulator_dev *rdev;
|
||||
struct tps_pmic *tps;
|
||||
struct tps6507x_board *tps_board;
|
||||
int i;
|
||||
int error;
|
||||
|
||||
@@ -496,13 +497,22 @@ static int __devinit tps_6507x_probe(struct i2c_client *client,
|
||||
I2C_FUNC_SMBUS_BYTE_DATA))
|
||||
return -EIO;
|
||||
|
||||
/**
|
||||
* tps_board points to pmic related constants
|
||||
* coming from the board-evm file.
|
||||
*/
|
||||
|
||||
tps_board = dev_get_platdata(&client->dev);
|
||||
if (!tps_board)
|
||||
return -EINVAL;
|
||||
|
||||
/**
|
||||
* init_data points to array of regulator_init structures
|
||||
* coming from the board-evm file.
|
||||
*/
|
||||
init_data = client->dev.platform_data;
|
||||
init_data = tps_board->tps6507x_pmic_init_data;
|
||||
if (!init_data)
|
||||
return -EIO;
|
||||
return -EINVAL;
|
||||
|
||||
tps = kzalloc(sizeof(*tps), GFP_KERNEL);
|
||||
if (!tps)
|
||||
|
Reference in New Issue
Block a user