[PATCH 1/2] ASoC: cs35l56: Make SoundWire DP3 mixer registers volatile

From: Richard Fitzgerald

Date: Thu Nov 26 2026 - 10:51:19 EST


Mark the CS35L56_SWIRE_DP3_CH*_INPUT registers as volatile so that
reading them won't populate the regmap cache with a value that overwrites
the register value during a regcache_sync().

These registers are owned by the firmware so the driver must not write
to them. Previous commit f52668f474f1 ("ASoC: cs35l56: Remove SDW1 TX
source controls and widgets") removed the DAPM widgets so that the driver
does not read or write these registers. But it left the possibility that
reading the regmap through debugfs would populate the cache value and so
unintentionally overwrite them on the next regcache_sync(). Marking them
volatile prevents this.

Fixes: f52668f474f1 ("ASoC: cs35l56: Remove SDW1 TX source controls and widgets")
Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
---
sound/soc/codecs/cs35l56-shared.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index 34aebf81f4a4..329351de32b1 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -232,6 +232,10 @@ static bool cs35l56_common_volatile_reg(unsigned int reg)
case CS35L56_DACPCM2_INPUT: /* owned by firmware */
case CS35L56_DSP1RX1_INPUT: /* owned by firmware */
case CS35L56_DSP1RX2_INPUT: /* owned by firmware */
+ case CS35L56_SWIRE_DP3_CH1_INPUT: /* owned by firmware */
+ case CS35L56_SWIRE_DP3_CH2_INPUT: /* owned by firmware */
+ case CS35L56_SWIRE_DP3_CH3_INPUT: /* owned by firmware */
+ case CS35L56_SWIRE_DP3_CH4_INPUT: /* owned by firmware */
case CS35L56_IRQ1_STATUS:
case CS35L56_IRQ1_EINT_1 ... CS35L56_IRQ1_EINT_8:
case CS35L56_IRQ1_EINT_18:
--
2.47.3