]> xenbits.xensource.com Git - people/aperard/linux-arndale.git/commitdiff
regulator: s5m8767: Fix to read the first DVS register.
authorAmit Daniel Kachhap <amit.daniel@samsung.com>
Fri, 7 Dec 2012 06:11:43 +0000 (11:41 +0530)
committerVasanth Ananthan <vasanthananthan@gmail.com>
Tue, 8 Jan 2013 10:34:50 +0000 (16:04 +0530)
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>
drivers/regulator/s5m8767.c

index df0b094097bf0d66db68a1153a25b079694f3ae5..7ed7591be71db347bee3c92827223c800e53b9b5 100644 (file)
@@ -272,17 +272,17 @@ static int s5m8767_get_voltage_register(struct regulator_dev *rdev, int *_reg)
                reg = S5M8767_REG_BUCK1CTRL2;
                break;
        case S5M8767_BUCK2:
-               reg = S5M8767_REG_BUCK2DVS2;
+               reg = S5M8767_REG_BUCK2DVS1;
                if (s5m8767->buck2_gpiodvs)
                        reg += s5m8767->buck_gpioindex;
                break;
        case S5M8767_BUCK3:
-               reg = S5M8767_REG_BUCK3DVS2;
+               reg = S5M8767_REG_BUCK3DVS1;
                if (s5m8767->buck3_gpiodvs)
                        reg += s5m8767->buck_gpioindex;
                break;
        case S5M8767_BUCK4:
-               reg = S5M8767_REG_BUCK4DVS2;
+               reg = S5M8767_REG_BUCK4DVS1;
                if (s5m8767->buck4_gpiodvs)
                        reg += s5m8767->buck_gpioindex;
                break;