diff options
Diffstat (limited to 'drivers/regulator/da903x.c')
-rw-r--r-- | drivers/regulator/da903x.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index b8b89ef10a84..33dfeeb9407c 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c | |||
@@ -64,6 +64,14 @@ | |||
64 | #define DA9034_MDTV2 (0x33) | 64 | #define DA9034_MDTV2 (0x33) |
65 | #define DA9034_MVRC (0x34) | 65 | #define DA9034_MVRC (0x34) |
66 | 66 | ||
67 | /* DA9035 Registers. DA9034 Registers are comptabile to DA9035. */ | ||
68 | #define DA9035_OVER3 (0x12) | ||
69 | #define DA9035_VCC2 (0x1f) | ||
70 | #define DA9035_3DTV1 (0x2c) | ||
71 | #define DA9035_3DTV2 (0x2d) | ||
72 | #define DA9035_3VRC (0x2e) | ||
73 | #define DA9035_AUTOSKIP (0x2f) | ||
74 | |||
67 | struct da903x_regulator_info { | 75 | struct da903x_regulator_info { |
68 | struct regulator_desc desc; | 76 | struct regulator_desc desc; |
69 | 77 | ||
@@ -388,6 +396,27 @@ static struct regulator_ops da9034_regulator_ldo12_ops = { | |||
388 | .enable_bit = (ebit), \ | 396 | .enable_bit = (ebit), \ |
389 | } | 397 | } |
390 | 398 | ||
399 | #define DA9035_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \ | ||
400 | { \ | ||
401 | .desc = { \ | ||
402 | .name = #_id, \ | ||
403 | .ops = &da9034_regulator_dvc_ops, \ | ||
404 | .type = REGULATOR_VOLTAGE, \ | ||
405 | .id = DA9035_ID_##_id, \ | ||
406 | .owner = THIS_MODULE, \ | ||
407 | }, \ | ||
408 | .min_uV = (min) * 1000, \ | ||
409 | .max_uV = (max) * 1000, \ | ||
410 | .step_uV = (step) * 1000, \ | ||
411 | .vol_reg = DA9035_##vreg, \ | ||
412 | .vol_shift = (0), \ | ||
413 | .vol_nbits = (nbits), \ | ||
414 | .update_reg = DA9035_##ureg, \ | ||
415 | .update_bit = (ubit), \ | ||
416 | .enable_reg = DA9035_##ereg, \ | ||
417 | .enable_bit = (ebit), \ | ||
418 | } | ||
419 | |||
391 | #define DA9034_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit) \ | 420 | #define DA9034_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit) \ |
392 | DA903x_LDO(DA9034, _id, min, max, step, vreg, shift, nbits, ereg, ebit) | 421 | DA903x_LDO(DA9034, _id, min, max, step, vreg, shift, nbits, ereg, ebit) |
393 | 422 | ||
@@ -435,6 +464,9 @@ static struct da903x_regulator_info da903x_regulator_info[] = { | |||
435 | DA9034_LDO(14, 1800, 3300, 100, LDO1514, 0, 4, OVER3, 0), | 464 | DA9034_LDO(14, 1800, 3300, 100, LDO1514, 0, 4, OVER3, 0), |
436 | DA9034_LDO(15, 1800, 3300, 100, LDO1514, 4, 4, OVER3, 1), | 465 | DA9034_LDO(15, 1800, 3300, 100, LDO1514, 4, 4, OVER3, 1), |
437 | DA9034_LDO(5, 3100, 3100, 0, INVAL, 0, 0, OVER3, 7), /* fixed @3.1V */ | 466 | DA9034_LDO(5, 3100, 3100, 0, INVAL, 0, 0, OVER3, 7), /* fixed @3.1V */ |
467 | |||
468 | /* DA9035 */ | ||
469 | DA9035_DVC(BUCK3, 1800, 2200, 100, 3DTV1, 3, VCC2, 0, OVER3, 3), | ||
438 | }; | 470 | }; |
439 | 471 | ||
440 | static inline struct da903x_regulator_info *find_regulator_info(int id) | 472 | static inline struct da903x_regulator_info *find_regulator_info(int id) |