Commit fc999b83799074832367d3cfd724c341c849a7da

Authored by Marcus Folkesson
Committed by Liam Girdwood
1 parent 0fcdb109a5

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>

Showing 1 changed file with 11 additions and 0 deletions Side-by-side Diff

drivers/regulator/tps65023-regulator.c
... ... @@ -63,6 +63,13 @@
63 63 #define TPS65023_REG_CTRL_LDO2_EN BIT(2)
64 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 73 /* LDO_CTRL bitfields */
67 74 #define TPS65023_LDO_CTRL_LDOx_SHIFT(ldo_id) ((ldo_id)*4)
68 75 #define TPS65023_LDO_CTRL_LDOx_MASK(ldo_id) (0xF0 >> ((ldo_id)*4))
... ... @@ -474,6 +481,10 @@
474 481 }
475 482  
476 483 i2c_set_clientdata(client, tps);
  484 +
  485 + /* Enable setting output voltage by I2C */
  486 + tps_65023_clear_bits(tps, TPS65023_REG_CON_CTRL2,
  487 + TPS65023_REG_CTRL2_CORE_ADJ);
477 488  
478 489 return 0;
479 490