aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Garren <[email protected]>2020-05-04 09:43:20 -0400
committerMark Brown <[email protected]>2020-05-04 15:36:50 +0100
commitf2b1e1cbd352129cfdbc1af52059482d74b4e81a (patch)
tree0edc1bdafd0aa7758dde1ecf1155fbe752417faf
parent454b3766de45f8508b343e509fdde959b4ff289c (diff)
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]>
-rw-r--r--sound/soc/codecs/adau7118-i2c.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/adau7118-i2c.c b/sound/soc/codecs/adau7118-i2c.c
index a8211362fe82..aa7afb3b826d 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,