aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps62360-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-06-13 21:38:26 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-23 07:16:42 -0400
commitb5152415225ba0d489939778f3b85217b25036db (patch)
tree4a458a9968636c97cece95dab9886c9b666a30ef /drivers/regulator/tps62360-regulator.c
parentb19dbf711e8dae026f8d014eae90d766d02f4acb (diff)
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: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/tps62360-regulator.c')
-rw-r--r--drivers/regulator/tps62360-regulator.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index d044a58640e7..bcea4e1eea1e 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -65,10 +65,8 @@ struct tps62360_chip {
65 struct regulator_desc desc; 65 struct regulator_desc desc;
66 struct regulator_dev *rdev; 66 struct regulator_dev *rdev;
67 struct regmap *regmap; 67 struct regmap *regmap;
68 int chip_id;
69 int vsel0_gpio; 68 int vsel0_gpio;
70 int vsel1_gpio; 69 int vsel1_gpio;
71 int voltage_base;
72 u8 voltage_reg_mask; 70 u8 voltage_reg_mask;
73 bool en_internal_pulldn; 71 bool en_internal_pulldn;
74 bool en_discharge; 72 bool en_discharge;
@@ -401,13 +399,13 @@ static int __devinit tps62360_probe(struct i2c_client *client,
401 switch (chip_id) { 399 switch (chip_id) {
402 case TPS62360: 400 case TPS62360:
403 case TPS62362: 401 case TPS62362:
404 tps->voltage_base = TPS62360_BASE_VOLTAGE; 402 tps->desc.min_uV = TPS62360_BASE_VOLTAGE;
405 tps->voltage_reg_mask = 0x3F; 403 tps->voltage_reg_mask = 0x3F;
406 tps->desc.n_voltages = TPS62360_N_VOLTAGES; 404 tps->desc.n_voltages = TPS62360_N_VOLTAGES;
407 break; 405 break;
408 case TPS62361: 406 case TPS62361:
409 case TPS62363: 407 case TPS62363:
410 tps->voltage_base = TPS62361_BASE_VOLTAGE; 408 tps->desc.min_uV = TPS62361_BASE_VOLTAGE;
411 tps->voltage_reg_mask = 0x7F; 409 tps->voltage_reg_mask = 0x7F;
412 tps->desc.n_voltages = TPS62361_N_VOLTAGES; 410 tps->desc.n_voltages = TPS62361_N_VOLTAGES;
413 break; 411 break;
@@ -420,7 +418,6 @@ static int __devinit tps62360_probe(struct i2c_client *client,
420 tps->desc.ops = &tps62360_dcdc_ops; 418 tps->desc.ops = &tps62360_dcdc_ops;
421 tps->desc.type = REGULATOR_VOLTAGE; 419 tps->desc.type = REGULATOR_VOLTAGE;
422 tps->desc.owner = THIS_MODULE; 420 tps->desc.owner = THIS_MODULE;
423 tps->desc.min_uV = tps->voltage_base;
424 tps->desc.uV_step = 10000; 421 tps->desc.uV_step = 10000;
425 422
426 tps->regmap = devm_regmap_init_i2c(client, &tps62360_regmap_config); 423 tps->regmap = devm_regmap_init_i2c(client, &tps62360_regmap_config);