Skip to content

Commit

Permalink
ASoC: pcm512x: Trigger auto-increment of register addresses on i2c
Browse files Browse the repository at this point in the history
When the codec is connected using i2c, it will only auto-increment
register addresses if msb (0x80) of the register address byte is set.

[Fixes cache sync if multiple adjacent registers are updated -- broonie]

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
  • Loading branch information
Peter Rosin authored and Mark Brown committed Dec 8, 2014
1 parent b2776bf commit 681a195
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sound/soc/codecs/pcm512x-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ static int pcm512x_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
struct regmap *regmap;
struct regmap_config config = pcm512x_regmap;

regmap = devm_regmap_init_i2c(i2c, &pcm512x_regmap);
/* msb needs to be set to enable auto-increment of addresses */
config.read_flag_mask = 0x80;
config.write_flag_mask = 0x80;

regmap = devm_regmap_init_i2c(i2c, &config);
if (IS_ERR(regmap))
return PTR_ERR(regmap);

Expand Down

0 comments on commit 681a195

Please sign in to comment.