From: Marcus Folkesson Date: Mon, 8 Aug 2011 18:29:32 +0000 (+0200) Subject: regulator: tps65023: Fixes i2c configuration issues X-Git-Tag: firefly_0821_release~3680^2~4245^2~11 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f068ad8cca7532bc42115d61489de00fe57c3909;p=firefly-linux-kernel-4.4.55.git regulator: tps65023: Fixes i2c configuration issues Allow i2c core voltage adjustments by clearing CORE ADJ Allowed bit in CTRL2 Signed-off-by: Marcus Folkesson Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- 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 @@ #define TPS65023_REG_CTRL2_DCDC1 BIT(2) #define TPS65023_REG_CTRL2_DCDC3 BIT(0) +/* REG_CTRL2 bitfields */ +#define TPS65023_REG_CTRL2_GO BIT(7) +#define TPS65023_REG_CTRL2_CORE_ADJ BIT(6) +#define TPS65023_REG_CTRL2_DCDC2 BIT(2) +#define TPS65023_REG_CTRL2_DCDC1 BIT(1) +#define TPS65023_REG_CTRL2_DCDC3 BIT(0) + /* LDO_CTRL bitfields */ #define TPS65023_LDO_CTRL_LDOx_SHIFT(ldo_id) ((ldo_id)*4) #define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0xF0 >> ((ldo_id)*4)) @@ -482,6 +489,10 @@ static int __devinit tps_65023_probe(struct i2c_client *client, i2c_set_clientdata(client, tps); + /* Enable setting output voltage by I2C */ + tps_65023_clear_bits(tps, TPS65023_REG_CON_CTRL2, + TPS65023_REG_CTRL2_CORE_ADJ); + /* Enable setting output voltage by I2C */ tps_65023_clear_bits(tps, TPS65023_REG_CON_CTRL2, TPS65023_REG_CTRL2_CORE_ADJ);