Skip to content

Commit

Permalink
ASoC: tlv320aic3x: Mark the RESET register as volatile
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and broonie committed Dec 31, 2016
1 parent a5de5b7 commit 63c3194
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,26 @@ static const struct reg_default aic3x_reg[] = {
{ 108, 0x00 }, { 109, 0x00 },
};

static bool aic3x_volatile_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
case AIC3X_RESET:
return true;
default:
return false;
}
}

static const struct regmap_config aic3x_regmap = {
.reg_bits = 8,
.val_bits = 8,

.max_register = DAC_ICC_ADJ,
.reg_defaults = aic3x_reg,
.num_reg_defaults = ARRAY_SIZE(aic3x_reg),

.volatile_reg = aic3x_volatile_reg,

.cache_type = REGCACHE_RBTREE,
};

Expand Down

0 comments on commit 63c3194

Please sign in to comment.