]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
regulator: support da9030 BUCK in da903x driver
authorHaojian Zhuang <haojian.zhuang@marvell.com>
Wed, 8 Jul 2009 09:57:24 +0000 (17:57 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 22 Sep 2009 12:32:37 +0000 (13:32 +0100)
Support the operation of DA9030 BUCK2 in da903x driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/da903x.c

index 33dfeeb9407c49238ab4404ae2d0816d971ca6b7..49081b44bf52cc8383e04cd80773843c0874160b 100644 (file)
@@ -375,6 +375,27 @@ static struct regulator_ops da9034_regulator_ldo12_ops = {
        .enable_bit     = (ebit),                                       \
 }
 
+#define DA9030_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \
+{                                                                      \
+       .desc   = {                                                     \
+               .name   = #_id,                                         \
+               .ops    = &da9034_regulator_dvc_ops,                    \
+               .type   = REGULATOR_VOLTAGE,                            \
+               .id     = DA9030_ID_##_id,                              \
+               .owner  = THIS_MODULE,                                  \
+       },                                                              \
+       .min_uV         = (min) * 1000,                                 \
+       .max_uV         = (max) * 1000,                                 \
+       .step_uV        = (step) * 1000,                                \
+       .vol_reg        = DA9030_##vreg,                                \
+       .vol_shift      = (0),                                          \
+       .vol_nbits      = (nbits),                                      \
+       .update_reg     = DA9030_##ureg,                                \
+       .update_bit     = (ubit),                                       \
+       .enable_reg     = DA9030_##ereg,                                \
+       .enable_bit     = (ebit),                                       \
+}
+
 #define DA9034_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \
 {                                                                      \
        .desc   = {                                                     \
@@ -425,6 +446,8 @@ static struct regulator_ops da9034_regulator_ldo12_ops = {
 
 static struct da903x_regulator_info da903x_regulator_info[] = {
        /* DA9030 */
+       DA9030_DVC(BUCK2, 850, 1625, 25, BUCK2DVM1, 5, BUCK2DVM1, 7, RCTL11, 0),
+
        DA9030_LDO( 1, 1200, 3200, 100,    LDO1, 0, 5, RCTL12, 1),
        DA9030_LDO( 2, 1800, 3200, 100,   LDO23, 0, 4, RCTL12, 2),
        DA9030_LDO( 3, 1800, 3200, 100,   LDO23, 4, 4, RCTL12, 3),