* [PATCH] ASoC: pcm512x: Trigger auto-increment of register addresses on i2c
@ 2014-12-08 15:33 Peter Rosin
2014-12-08 20:46 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Peter Rosin @ 2014-12-08 15:33 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown, linux-kernel, Peter Rosin
From: Peter Rosin <peda@axentia.se>
When the codec is connected using i2c, it will only auto-increment
register addresses if msb (0x80) of the register address byte is set.
Signed-off-by: Peter Rosin <peda@axentia.se>
---
sound/soc/codecs/pcm512x-i2c.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/pcm512x-i2c.c b/sound/soc/codecs/pcm512x-i2c.c
index 4d62230bd378..d0547fa275fc 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);
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: pcm512x: Trigger auto-increment of register addresses on i2c
2014-12-08 15:33 [PATCH] ASoC: pcm512x: Trigger auto-increment of register addresses on i2c Peter Rosin
@ 2014-12-08 20:46 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-12-08 20:46 UTC (permalink / raw)
To: Peter Rosin; +Cc: alsa-devel, Liam Girdwood, linux-kernel, Peter Rosin
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
On Mon, Dec 08, 2014 at 04:33:11PM +0100, Peter Rosin wrote:
> From: Peter Rosin <peda@axentia.se>
>
> When the codec is connected using i2c, it will only auto-increment
> register addresses if msb (0x80) of the register address byte is set.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-08 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-08 15:33 [PATCH] ASoC: pcm512x: Trigger auto-increment of register addresses on i2c Peter Rosin
2014-12-08 20:46 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®