Commit f2b1e1cb authored by Chris Garren's avatar Chris Garren Committed by Mark Brown

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: default avatarChris Garren <cdgarren@indesign-llc.com>
Link: https://lore.kernel.org/r/1588599820-57994-1-git-send-email-cdgarren@indesign-llc.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 454b3766
...@@ -32,6 +32,12 @@ static const struct reg_default adau7118_reg_defaults[] = { ...@@ -32,6 +32,12 @@ static const struct reg_default adau7118_reg_defaults[] = {
{ ADAU7118_REG_RESET, 0x00 }, { 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 = { static const struct regmap_config adau7118_regmap_config = {
.reg_bits = 8, .reg_bits = 8,
.val_bits = 8, .val_bits = 8,
...@@ -39,6 +45,7 @@ static const struct regmap_config adau7118_regmap_config = { ...@@ -39,6 +45,7 @@ static const struct regmap_config adau7118_regmap_config = {
.num_reg_defaults = ARRAY_SIZE(adau7118_reg_defaults), .num_reg_defaults = ARRAY_SIZE(adau7118_reg_defaults),
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
.max_register = ADAU7118_REG_RESET, .max_register = ADAU7118_REG_RESET,
.volatile_reg = adau7118_volatile,
}; };
static int adau7118_probe_i2c(struct i2c_client *i2c, static int adau7118_probe_i2c(struct i2c_client *i2c,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment