diff options
author | Marcus Folkesson <marcus.folkesson@gmail.com> | 2011-08-04 07:33:49 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-08-08 12:31:03 -0400 |
commit | fc999b83799074832367d3cfd724c341c849a7da (patch) | |
tree | 25c1437715a4f3bebda9c91d4105bca13ef44229 /drivers/regulator | |
parent | 0fcdb109a50afb8b26709175937ba3de9486770b (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 701a5900f83f..a81abd4871ba 100644 --- a/drivers/regulator/tps65023-regulator.c +++ b/drivers/regulator/tps65023-regulator.c | |||
@@ -63,6 +63,13 @@ | |||
63 | #define TPS65023_REG_CTRL_LDO2_EN BIT(2) | 63 | #define TPS65023_REG_CTRL_LDO2_EN BIT(2) |
64 | #define TPS65023_REG_CTRL_LDO1_EN BIT(1) | 64 | #define TPS65023_REG_CTRL_LDO1_EN BIT(1) |
65 | 65 | ||
66 | /* REG_CTRL2 bitfields */ | ||
67 | #define TPS65023_REG_CTRL2_GO BIT(7) | ||
68 | #define TPS65023_REG_CTRL2_CORE_ADJ BIT(6) | ||
69 | #define TPS65023_REG_CTRL2_DCDC2 BIT(2) | ||
70 | #define TPS65023_REG_CTRL2_DCDC1 BIT(2) | ||
71 | #define TPS65023_REG_CTRL2_DCDC3 BIT(0) | ||
72 | |||
66 | /* LDO_CTRL bitfields */ | 73 | /* LDO_CTRL bitfields */ |
67 | #define TPS65023_LDO_CTRL_LDOx_SHIFT(ldo_id) ((ldo_id)*4) | 74 | #define TPS65023_LDO_CTRL_LDOx_SHIFT(ldo_id) ((ldo_id)*4) |
68 | #define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0xF0 >> ((ldo_id)*4)) | 75 | #define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0xF0 >> ((ldo_id)*4)) |
@@ -475,6 +482,10 @@ static int __devinit tps_65023_probe(struct i2c_client *client, | |||
475 | 482 | ||
476 | i2c_set_clientdata(client, tps); | 483 | i2c_set_clientdata(client, tps); |
477 | 484 | ||
485 | /* Enable setting output voltage by I2C */ | ||
486 | tps_65023_clear_bits(tps, TPS65023_REG_CON_CTRL2, | ||
487 | TPS65023_REG_CTRL2_CORE_ADJ); | ||
488 | |||
478 | return 0; | 489 | return 0; |
479 | 490 | ||
480 | fail: | 491 | fail: |