diff options
author | Marcus Folkesson <marcus.folkesson@gmail.com> | 2011-08-08 14:29:32 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-08-28 12:43:40 -0400 |
commit | f068ad8cca7532bc42115d61489de00fe57c3909 (patch) | |
tree | ed8ccc3db350eded52681950e93cfdba6bb8a354 /drivers/regulator | |
parent | ba55a9741da6c85176987c15e24383b858749aa2 (diff) |
regulator: tps65023: Fixes i2c configuration issues
Allow i2c core voltage adjustments by clearing CORE ADJ Allowed bit in CTRL2
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/tps65023-regulator.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c index a81abd4871ba..b912daae9fa0 100644 --- a/drivers/regulator/tps65023-regulator.c +++ b/drivers/regulator/tps65023-regulator.c | |||
@@ -70,6 +70,13 @@ | |||
70 | #define TPS65023_REG_CTRL2_DCDC1 BIT(2) | 70 | #define TPS65023_REG_CTRL2_DCDC1 BIT(2) |
71 | #define TPS65023_REG_CTRL2_DCDC3 BIT(0) | 71 | #define TPS65023_REG_CTRL2_DCDC3 BIT(0) |
72 | 72 | ||
73 | /* REG_CTRL2 bitfields */ | ||
74 | #define TPS65023_REG_CTRL2_GO BIT(7) | ||
75 | #define TPS65023_REG_CTRL2_CORE_ADJ BIT(6) | ||
76 | #define TPS65023_REG_CTRL2_DCDC2 BIT(2) | ||
77 | #define TPS65023_REG_CTRL2_DCDC1 BIT(1) | ||
78 | #define TPS65023_REG_CTRL2_DCDC3 BIT(0) | ||
79 | |||
73 | /* LDO_CTRL bitfields */ | 80 | /* LDO_CTRL bitfields */ |
74 | #define TPS65023_LDO_CTRL_LDOx_SHIFT(ldo_id) ((ldo_id)*4) | 81 | #define TPS65023_LDO_CTRL_LDOx_SHIFT(ldo_id) ((ldo_id)*4) |
75 | #define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0xF0 >> ((ldo_id)*4)) | 82 | #define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0xF0 >> ((ldo_id)*4)) |
@@ -486,6 +493,10 @@ static int __devinit tps_65023_probe(struct i2c_client *client, | |||
486 | tps_65023_clear_bits(tps, TPS65023_REG_CON_CTRL2, | 493 | tps_65023_clear_bits(tps, TPS65023_REG_CON_CTRL2, |
487 | TPS65023_REG_CTRL2_CORE_ADJ); | 494 | TPS65023_REG_CTRL2_CORE_ADJ); |
488 | 495 | ||
496 | /* Enable setting output voltage by I2C */ | ||
497 | tps_65023_clear_bits(tps, TPS65023_REG_CON_CTRL2, | ||
498 | TPS65023_REG_CTRL2_CORE_ADJ); | ||
499 | |||
489 | return 0; | 500 | return 0; |
490 | 501 | ||
491 | fail: | 502 | fail: |