aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Daniel Kachhap <amit.daniel@samsung.com>2012-12-10 07:49:40 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-10 22:44:05 -0500
commitda130ab2dfd5201d5c09e83882f30d62f29ab5f5 (patch)
treede9159b9db7c64a1db598f659a816c6ecc5404a4
parent9bb096ff375f41e4c22000fd21f0ed01e2348c3e (diff)
regulator: s5m8767: Fix to read the first DVS register.
This patch modifies the DVS register read function to select correct DVS1 register. This change is required because the GPIO select pin is 000 in unintialized state and hence selects the DVS1 register. Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--drivers/regulator/s5m8767.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 213c18b58dd..4afca9d570d 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -272,17 +272,17 @@ static int s5m8767_get_voltage_register(struct regulator_dev *rdev, int *_reg)
272 reg = S5M8767_REG_BUCK1CTRL2; 272 reg = S5M8767_REG_BUCK1CTRL2;
273 break; 273 break;
274 case S5M8767_BUCK2: 274 case S5M8767_BUCK2:
275 reg = S5M8767_REG_BUCK2DVS2; 275 reg = S5M8767_REG_BUCK2DVS1;
276 if (s5m8767->buck2_gpiodvs) 276 if (s5m8767->buck2_gpiodvs)
277 reg += s5m8767->buck_gpioindex; 277 reg += s5m8767->buck_gpioindex;
278 break; 278 break;
279 case S5M8767_BUCK3: 279 case S5M8767_BUCK3:
280 reg = S5M8767_REG_BUCK3DVS2; 280 reg = S5M8767_REG_BUCK3DVS1;
281 if (s5m8767->buck3_gpiodvs) 281 if (s5m8767->buck3_gpiodvs)
282 reg += s5m8767->buck_gpioindex; 282 reg += s5m8767->buck_gpioindex;
283 break; 283 break;
284 case S5M8767_BUCK4: 284 case S5M8767_BUCK4:
285 reg = S5M8767_REG_BUCK4DVS2; 285 reg = S5M8767_REG_BUCK4DVS1;
286 if (s5m8767->buck4_gpiodvs) 286 if (s5m8767->buck4_gpiodvs)
287 reg += s5m8767->buck_gpioindex; 287 reg += s5m8767->buck_gpioindex;
288 break; 288 break;