提交 75306820 编写于 作者: M Mark Brown

ASoC: da732x: Mark DC offset control registers volatile

The driver reads from the DC offset control registers during callibration
but since the registers are marked as volatile and there is a register
cache the values will not be read from the hardware after the first reading
rendering the callibration ineffective.

It appears that the driver was originally written for the ASoC level
register I/O code but converted to regmap prior to merge and this issue
was missed during the conversion as the framework level volatile register
functionality was not being used.
Signed-off-by: NMark Brown <broonie@linaro.org>
Acked-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: stable@vger.kernel.org
上级 38dbfb59
...@@ -1268,11 +1268,23 @@ static struct snd_soc_dai_driver da732x_dai[] = { ...@@ -1268,11 +1268,23 @@ static struct snd_soc_dai_driver da732x_dai[] = {
}, },
}; };
static bool da732x_volatile(struct device *dev, unsigned int reg)
{
switch (reg) {
case DA732X_REG_HPL_DAC_OFF_CNTL:
case DA732X_REG_HPR_DAC_OFF_CNTL:
return true;
default:
return false;
}
}
static const struct regmap_config da732x_regmap = { static const struct regmap_config da732x_regmap = {
.reg_bits = 8, .reg_bits = 8,
.val_bits = 8, .val_bits = 8,
.max_register = DA732X_MAX_REG, .max_register = DA732X_MAX_REG,
.volatile_reg = da732x_volatile,
.reg_defaults = da732x_reg_cache, .reg_defaults = da732x_reg_cache,
.num_reg_defaults = ARRAY_SIZE(da732x_reg_cache), .num_reg_defaults = ARRAY_SIZE(da732x_reg_cache),
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册