aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/da732x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-02-23 21:59:14 -0500
committerMark Brown <broonie@linaro.org>2014-02-26 06:30:36 -0500
commit75306820248e26d15d84acf4e297b9fb27dd3bb2 (patch)
tree7cf2c0119f6142ddc6a6820d39c480bbad65fe5a /sound/soc/codecs/da732x.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
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: Mark Brown <broonie@linaro.org> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'sound/soc/codecs/da732x.c')
-rw-r--r--sound/soc/codecs/da732x.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index f295b6569910..f4d965ebc29e 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -1268,11 +1268,23 @@ static struct snd_soc_dai_driver da732x_dai[] = {
1268 }, 1268 },
1269}; 1269};
1270 1270
1271static bool da732x_volatile(struct device *dev, unsigned int reg)
1272{
1273 switch (reg) {
1274 case DA732X_REG_HPL_DAC_OFF_CNTL:
1275 case DA732X_REG_HPR_DAC_OFF_CNTL:
1276 return true;
1277 default:
1278 return false;
1279 }
1280}
1281
1271static const struct regmap_config da732x_regmap = { 1282static const struct regmap_config da732x_regmap = {
1272 .reg_bits = 8, 1283 .reg_bits = 8,
1273 .val_bits = 8, 1284 .val_bits = 8,
1274 1285
1275 .max_register = DA732X_MAX_REG, 1286 .max_register = DA732X_MAX_REG,
1287 .volatile_reg = da732x_volatile,
1276 .reg_defaults = da732x_reg_cache, 1288 .reg_defaults = da732x_reg_cache,
1277 .num_reg_defaults = ARRAY_SIZE(da732x_reg_cache), 1289 .num_reg_defaults = ARRAY_SIZE(da732x_reg_cache),
1278 .cache_type = REGCACHE_RBTREE, 1290 .cache_type = REGCACHE_RBTREE,