diff options
author | Ryan Lee <ryans.lee@maximintegrated.com> | 2021-03-25 06:35:53 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-25 16:59:46 +0300 |
commit | a23f9099ff1541f15704e96b784d3846d2a4483d (patch) | |
tree | 914f691d5384c6b7f9f7947b26813feaf6bf48e0 /sound/soc/codecs/max98373-i2c.c | |
parent | 632aeebe1b7a3a8b193d71942a10e66919bebfb8 (diff) | |
download | linux-a23f9099ff1541f15704e96b784d3846d2a4483d.tar.xz |
ASoC: max98373: Changed amp shutdown register as volatile
0x20FF(amp global enable) register was defined as non-volatile,
but it is not. Overheating, overcurrent can cause amp shutdown
in hardware.
'regmap_write' compare register readback value before writing
to avoid same value writing. 'regmap_read' just read cache
not actual hardware value for the non-volatile register.
When amp is internally shutdown by some reason, next 'AMP ON'
command can be ignored because regmap think amp is already ON.
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Link: https://lore.kernel.org/r/20210325033555.29377-1-ryans.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max98373-i2c.c')
-rw-r--r-- | sound/soc/codecs/max98373-i2c.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98373-i2c.c b/sound/soc/codecs/max98373-i2c.c index 85f6865019d4..ddb6436835d7 100644 --- a/sound/soc/codecs/max98373-i2c.c +++ b/sound/soc/codecs/max98373-i2c.c @@ -446,6 +446,7 @@ static bool max98373_volatile_reg(struct device *dev, unsigned int reg) case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK: case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK: case MAX98373_R20B6_BDE_CUR_STATE_READBACK: + case MAX98373_R20FF_GLOBAL_SHDN: case MAX98373_R21FF_REV_ID: return true; default: |