ASoC: max98373: don't access volatile registers in bias level off
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 17 Dec 2020 07:45:56 +0000 (15:45 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 17 Dec 2020 14:24:45 +0000 (14:24 +0000)
commit349dd23931d1943b1083182e35715eba8b150fe1
tree4fe1edffa8f35eb86a0e3efeff32b0913de87974
parent6108f990c0887d3e8f1db2d13c7012e40a061f28
ASoC: max98373: don't access volatile registers in bias level off

We will set regcache_cache_only true in suspend. As a result,
regmap_read will return error when we try to read volatile
registers in suspend. Besides, it doesn't make sense to read
feedback data when codec is not active. To make userspace
happy, this patch returns a cached value shich should be a
valid value.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20201217074556.32370-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98373-i2c.c
sound/soc/codecs/max98373-sdw.c
sound/soc/codecs/max98373.c
sound/soc/codecs/max98373.h