mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: broonie@kernel.org
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: [PATCH 1/2] ASoC: cs35l56: Make SoundWire DP3 mixer registers volatile
Date: Thu, 26 Nov 2026 15:44:08 +0000	[thread overview]
Message-ID: <20261126154409.1665214-2-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20261126154409.1665214-1-rf@opensource.cirrus.com>

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@opensource.cirrus.com>
---
 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


  reply	other threads:[~2026-11-26 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 15:44 [PATCH 0/2] ASoC: cs35l56: Bugfixes to series "Prepare for SDCA Companion Amp" Richard Fitzgerald
2026-11-26 15:44 ` Richard Fitzgerald [this message]
2026-11-26 15:44 ` [PATCH 2/2] ASoC: cs35l56-test: Initialize DP3 mixer registers in mock regmap Richard Fitzgerald
2026-11-26 17:14 ` [PATCH 0/2] ASoC: cs35l56: Bugfixes to series "Prepare for SDCA Companion Amp" Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261126154409.1665214-2-rf@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®