Skip to content

Commit dc19e98

Browse files
Peter Ujfalusigregkh
authored andcommitted
ASoC: tlv320aic3x: Mark the RESET register as volatile
[ Upstream commit 63c3194b82530bd71fd49db84eb7ab656b8d404a ] The RESET register only have one self clearing bit and it should not be cached. If it is cached, when we sync the registers back to the chip we will initiate a software reset as well, which is not desirable. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fc6c41f commit dc19e98

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

sound/soc/codecs/tlv320aic3x.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,26 @@ static const struct reg_default aic3x_reg[] = {
126126
{ 108, 0x00 }, { 109, 0x00 },
127127
};
128128

129+
static bool aic3x_volatile_reg(struct device *dev, unsigned int reg)
130+
{
131+
switch (reg) {
132+
case AIC3X_RESET:
133+
return true;
134+
default:
135+
return false;
136+
}
137+
}
138+
129139
static const struct regmap_config aic3x_regmap = {
130140
.reg_bits = 8,
131141
.val_bits = 8,
132142

133143
.max_register = DAC_ICC_ADJ,
134144
.reg_defaults = aic3x_reg,
135145
.num_reg_defaults = ARRAY_SIZE(aic3x_reg),
146+
147+
.volatile_reg = aic3x_volatile_reg,
148+
136149
.cache_type = REGCACHE_RBTREE,
137150
};
138151

0 commit comments

Comments
 (0)