Skip to contentSkip to conversation

regulator: mc13892: Fix voltage unit in test case.

PATCH New Fabio Estevam 3 participants 3 messages May 15, 2011 – May 16, 2011 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: mc13892: Fix voltage unit in test case.

Voltage values should be expressed in microvolts, not in milivolts.

---
 drivers/regulator/mc13892-regulator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/mc13892-regulator.c +2 -2
index 6f15168..e90ba05 100644
@@ -453,9 +453,9 @@ static int mc13892_sw_regulator_set_voltage(struct regulator_dev *rdev,
 		goto err;
 
 	hi  = val & MC13892_SWITCHERS0_SWxHI;
-	if (value > 1375)
+	if (value > 1375000)
 		hi = 1;
-	if (value < 1100)
+	if (value < 1100000)
 		hi = 0;
 
 	if (hi) {
Signature · 1 line
1.7.1
#2 lore raw

PATCH 1/1 regulator: mc13892: Fix voltage unit in test case.

In reply to Fabio Estevam
Quoted 14 lines · Fabio Estevam

Voltage values should be expressed in microvolts, not in milivolts.

---
 drivers/regulator/mc13892-regulator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/mc13892-regulator.c +0 -0
index 6f15168..e90ba05 100644
@@ -453,9 +453,9 @@ static int mc13892_sw_regulator_set_voltage(struct regulator_dev *rdev,
 		goto err;

drivers/regulator/mc13892-regulator.c static int mc13892_sw_regulator_set_voltage(struct regulator_dev *rdev, · line 461

Quoted 10 lines
drivers/regulator/mc13892-regulator.c +2 -2
 
 	hi  = val & MC13892_SWITCHERS0_SWxHI;
-	if (value > 1375)
+	if (value > 1375000)
 		hi = 1;
-	if (value < 1100)
+	if (value < 1100000)
 		hi = 0;
 
 	if (hi) {

This doesn't apply against the regulator for-next branch. Could you redo and add Mark's Ack.

Thanks.

Liam