regulator: Set n_voltages for da9052 regulators
authorAxel Lin <axel.lin@gmail.com>
Mon, 5 Mar 2012 12:04:32 +0000 (20:04 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 11 Mar 2012 20:39:04 +0000 (20:39 +0000)
The n_voltages setting for all LDOs and DCDCs are missing in current code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/da9052-regulator.c

index ea4d8f575ac6524676550789e93beb143cdb7cff..319ba51fe61d030de241b89c0642f0408cb63e41 100644 (file)
@@ -400,6 +400,7 @@ static struct regulator_ops da9052_ldo_ops = {
                .ops = &da9052_ldo5_6_ops,\
                .type = REGULATOR_VOLTAGE,\
                .id = _id,\
+               .n_voltages = (max - min) / step + 1, \
                .owner = THIS_MODULE,\
        },\
        .min_uV = (min) * 1000,\
@@ -417,6 +418,7 @@ static struct regulator_ops da9052_ldo_ops = {
                .ops = &da9052_ldo_ops,\
                .type = REGULATOR_VOLTAGE,\
                .id = _id,\
+               .n_voltages = (max - min) / step + 1, \
                .owner = THIS_MODULE,\
        },\
        .min_uV = (min) * 1000,\
@@ -434,6 +436,7 @@ static struct regulator_ops da9052_ldo_ops = {
                .ops = &da9052_dcdc_ops,\
                .type = REGULATOR_VOLTAGE,\
                .id = _id,\
+               .n_voltages = (max - min) / step + 1, \
                .owner = THIS_MODULE,\
        },\
        .min_uV = (min) * 1000,\
@@ -451,6 +454,7 @@ static struct regulator_ops da9052_ldo_ops = {
                .ops = &da9052_buckperi_ops,\
                .type = REGULATOR_VOLTAGE,\
                .id = _id,\
+               .n_voltages = (max - min) / step + 1, \
                .owner = THIS_MODULE,\
        },\
        .min_uV = (min) * 1000,\