Commit b5152415 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: tps62360: Remove chip_id and voltage_base from struct tps62360_chip

The chip_id is not used.
The voltage_base is not necessary, set base voltage to tps->desc.min_uV instead.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent b19dbf71
...@@ -65,10 +65,8 @@ struct tps62360_chip { ...@@ -65,10 +65,8 @@ struct tps62360_chip {
struct regulator_desc desc; struct regulator_desc desc;
struct regulator_dev *rdev; struct regulator_dev *rdev;
struct regmap *regmap; struct regmap *regmap;
int chip_id;
int vsel0_gpio; int vsel0_gpio;
int vsel1_gpio; int vsel1_gpio;
int voltage_base;
u8 voltage_reg_mask; u8 voltage_reg_mask;
bool en_internal_pulldn; bool en_internal_pulldn;
bool en_discharge; bool en_discharge;
...@@ -401,13 +399,13 @@ static int __devinit tps62360_probe(struct i2c_client *client, ...@@ -401,13 +399,13 @@ static int __devinit tps62360_probe(struct i2c_client *client,
switch (chip_id) { switch (chip_id) {
case TPS62360: case TPS62360:
case TPS62362: case TPS62362:
tps->voltage_base = TPS62360_BASE_VOLTAGE; tps->desc.min_uV = TPS62360_BASE_VOLTAGE;
tps->voltage_reg_mask = 0x3F; tps->voltage_reg_mask = 0x3F;
tps->desc.n_voltages = TPS62360_N_VOLTAGES; tps->desc.n_voltages = TPS62360_N_VOLTAGES;
break; break;
case TPS62361: case TPS62361:
case TPS62363: case TPS62363:
tps->voltage_base = TPS62361_BASE_VOLTAGE; tps->desc.min_uV = TPS62361_BASE_VOLTAGE;
tps->voltage_reg_mask = 0x7F; tps->voltage_reg_mask = 0x7F;
tps->desc.n_voltages = TPS62361_N_VOLTAGES; tps->desc.n_voltages = TPS62361_N_VOLTAGES;
break; break;
...@@ -420,7 +418,6 @@ static int __devinit tps62360_probe(struct i2c_client *client, ...@@ -420,7 +418,6 @@ static int __devinit tps62360_probe(struct i2c_client *client,
tps->desc.ops = &tps62360_dcdc_ops; tps->desc.ops = &tps62360_dcdc_ops;
tps->desc.type = REGULATOR_VOLTAGE; tps->desc.type = REGULATOR_VOLTAGE;
tps->desc.owner = THIS_MODULE; tps->desc.owner = THIS_MODULE;
tps->desc.min_uV = tps->voltage_base;
tps->desc.uV_step = 10000; tps->desc.uV_step = 10000;
tps->regmap = devm_regmap_init_i2c(client, &tps62360_regmap_config); tps->regmap = devm_regmap_init_i2c(client, &tps62360_regmap_config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment