Skip to contentSkip to conversation

regulator: mc13892: Fix voltage unit in test case.

PATCH New Fabio Estevam 2 participants 2 messages May 16, 2011 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

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

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

---
Changes since v1:

- Rebase it on top of Liam's regulator for-next tree.

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

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

Quoted 19 lines · Fabio Estevam

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

---
Changes since v1:

- Rebase it on top of Liam's regulator for-next tree.

 drivers/regulator/mc13892-regulator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/mc13892-regulator.c +0 -0
index 73347c8..6fffe67 100644
@@ -453,9 +453,9 @@ static int mc13892_sw_regulator_set_voltage(struct regulator_dev *rdev,
 	if (ret)

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
 		goto err;
 
-	if (value > 1375)
+	if (value > 1375000)
 		hi = 1;
-	else if (value < 1100)
+	else if (value < 1100000)
 		hi = 0;
 	else
 		hi = valread & MC13892_SWITCHERS0_SWxHI;

Applied.