Skip to contentSkip to conversation

regulator: tps65023: Set n_voltages to 1 for fixed voltage

PATCH Applied Axel Lin 2 participants 2 messages Jun 14, 2012 – Jun 17, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: tps65023: Set n_voltages to 1 for fixed voltage

For fixed voltage, the n_voltages should be 1 rather than 0.

---
 drivers/regulator/tps65023-regulator.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/regulator/tps65023-regulator.c +4 -1
index f841bd0..df8b70d 100644
@@ -324,7 +324,10 @@ static int __devinit tps_65023_probe(struct i2c_client *client,
 
 		tps->desc[i].name = info->name;
 		tps->desc[i].id = i;
-		tps->desc[i].n_voltages = info->table_len;
+		if (info->fixed)
+			tps->desc[i].n_voltages = 1;
+		else
+			tps->desc[i].n_voltages = info->table_len;
 		tps->desc[i].ops = (i > TPS65023_DCDC_3 ?
 					&tps65023_ldo_ops : &tps65023_dcdc_ops);
 		tps->desc[i].type = REGULATOR_VOLTAGE;
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 1 line · Axel Lin

For fixed voltage, the n_voltages should be 1 rather than 0.

Applied, thanks.