Skip to content

Commit f2b1e1c

Browse files
Chris Garrenbroonie
authored andcommitted
ASoC: adau7118: Mark the ADAU7118 reset register as volatile
Without this the previously written value was written to this reg, which caused the different configuration registers to be reset. Signed-off-by: Chris Garren <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 454b376 commit f2b1e1c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sound/soc/codecs/adau7118-i2c.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,20 @@ static const struct reg_default adau7118_reg_defaults[] = {
3232
{ ADAU7118_REG_RESET, 0x00 },
3333
};
3434

35+
static bool adau7118_volatile(struct device *dev, unsigned int reg)
36+
{
37+
return (reg == ADAU7118_REG_RESET);
38+
}
39+
40+
3541
static const struct regmap_config adau7118_regmap_config = {
3642
.reg_bits = 8,
3743
.val_bits = 8,
3844
.reg_defaults = adau7118_reg_defaults,
3945
.num_reg_defaults = ARRAY_SIZE(adau7118_reg_defaults),
4046
.cache_type = REGCACHE_RBTREE,
4147
.max_register = ADAU7118_REG_RESET,
48+
.volatile_reg = adau7118_volatile,
4249
};
4350

4451
static int adau7118_probe_i2c(struct i2c_client *i2c,

0 commit comments

Comments
 (0)