summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPeter Rosin <peda@axentia.se>2014-12-08 16:33:11 +0100
committerMark Brown <broonie@kernel.org>2014-12-08 20:45:36 +0000
commit681a19560378213a193c424881b2180a783b81ae (patch)
tree67576dd632d51a0da565e8a7714356c2b93e9fdf /sound
parentb2776bf7149bddd1f4161f14f79520f17fc1d71d (diff)
downloadop-kernel-dev-681a19560378213a193c424881b2180a783b81ae.zip
op-kernel-dev-681a19560378213a193c424881b2180a783b81ae.tar.gz
ASoC: pcm512x: Trigger auto-increment of register addresses on i2c
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
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/pcm512x-i2c.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/pcm512x-i2c.c b/sound/soc/codecs/pcm512x-i2c.c
index 4d62230..d0547fa 100644
--- a/sound/soc/codecs/pcm512x-i2c.c
+++ b/sound/soc/codecs/pcm512x-i2c.c
@@ -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);
OpenPOWER on IntegriCloud