* [PATCH] regulator: tps62360: Remove chip_id and voltage_base from struct tps62360_chip
@ 2012-06-14 1:38 Axel Lin
2012-06-23 11:17 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-06-14 1:38 UTC (permalink / raw)
To: linux-kernel; +Cc: Laxman Dewangan, Liam Girdwood, Mark Brown
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>
---
drivers/regulator/tps62360-regulator.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index e534269..ec3d0d5 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -65,10 +65,8 @@ struct tps62360_chip {
struct regulator_desc desc;
struct regulator_dev *rdev;
struct regmap *regmap;
- int chip_id;
int vsel0_gpio;
int vsel1_gpio;
- int voltage_base;
u8 voltage_reg_mask;
bool en_internal_pulldn;
bool en_discharge;
@@ -408,13 +406,13 @@ static int __devinit tps62360_probe(struct i2c_client *client,
switch (chip_id) {
case TPS62360:
case TPS62362:
- tps->voltage_base = TPS62360_BASE_VOLTAGE;
+ tps->desc.min_uV = TPS62360_BASE_VOLTAGE;
tps->voltage_reg_mask = 0x3F;
tps->desc.n_voltages = TPS62360_N_VOLTAGES;
break;
case TPS62361:
case TPS62363:
- tps->voltage_base = TPS62361_BASE_VOLTAGE;
+ tps->desc.min_uV = TPS62361_BASE_VOLTAGE;
tps->voltage_reg_mask = 0x7F;
tps->desc.n_voltages = TPS62361_N_VOLTAGES;
break;
@@ -427,7 +425,6 @@ static int __devinit tps62360_probe(struct i2c_client *client,
tps->desc.ops = &tps62360_dcdc_ops;
tps->desc.type = REGULATOR_VOLTAGE;
tps->desc.owner = THIS_MODULE;
- tps->desc.min_uV = tps->voltage_base;
tps->desc.uV_step = 10000;
tps->regmap = devm_regmap_init_i2c(client, &tps62360_regmap_config);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] regulator: tps62360: Remove chip_id and voltage_base from struct tps62360_chip
2012-06-14 1:38 [PATCH] regulator: tps62360: Remove chip_id and voltage_base from struct tps62360_chip Axel Lin
@ 2012-06-23 11:17 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-06-23 11:17 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Laxman Dewangan, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
On Thu, Jun 14, 2012 at 09:38:26AM +0800, Axel Lin wrote:
> The chip_id is not used.
> The voltage_base is not necessary, set base voltage to tps->desc.min_uV instead.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-23 11:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-14 1:38 [PATCH] regulator: tps62360: Remove chip_id and voltage_base from struct tps62360_chip Axel Lin
2012-06-23 11:17 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox