[PATCH] Mark the ADAU7118 reset register as volatile.
From: Chris Garren cdgarren@indesign-llc.com
Without this the previously written value was written to this reg, which caused the different configuration registers to be reset. --- sound/soc/codecs/adau7118-i2c.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/sound/soc/codecs/adau7118-i2c.c b/sound/soc/codecs/adau7118-i2c.c index a821136..aa7afb3 100644 --- a/sound/soc/codecs/adau7118-i2c.c +++ b/sound/soc/codecs/adau7118-i2c.c @@ -32,6 +32,12 @@ static const struct reg_default adau7118_reg_defaults[] = { { ADAU7118_REG_RESET, 0x00 }, };
+static bool adau7118_volatile(struct device *dev, unsigned int reg) +{ + return (reg == ADAU7118_REG_RESET); +} + + static const struct regmap_config adau7118_regmap_config = { .reg_bits = 8, .val_bits = 8, @@ -39,6 +45,7 @@ static const struct regmap_config adau7118_regmap_config = { .num_reg_defaults = ARRAY_SIZE(adau7118_reg_defaults), .cache_type = REGCACHE_RBTREE, .max_register = ADAU7118_REG_RESET, + .volatile_reg = adau7118_volatile, };
static int adau7118_probe_i2c(struct i2c_client *i2c,
On Fri, May 01, 2020 at 04:30:06PM -0400, chris.d.garren@gmail.com wrote:
From: Chris Garren cdgarren@indesign-llc.com
Without this the previously written value was written to this reg, which caused the different configuration registers to be reset.
I can't do anything with this, you've not provided a Signed-off-by - please see submitting-patches.rst for details on what that means and why it's important.
participants (2)
-
chris.d.garren@gmail.com
-
Mark Brown