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 3/4] ASoC: cs35l56: Eliminate trivial regmap patch
Date: Fri, 20 Nov 2026 11:04:40 +0000 [thread overview]
Message-ID: <20261120110441.2163567-4-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20261120110441.2163567-1-rf@opensource.cirrus.com>
Previous commits removed most of the registers from the common
cs35l56_patch, leaving only one register in this patch. Move that single
register patch into the separate cs35l56 and cs35l63 patches and remove
the trivial common patch.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
sound/soc/codecs/cs35l56-shared.c | 28 +++++++---------------------
1 file changed, 7 insertions(+), 21 deletions(-)
diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c
index 073f7bdd3b0d..34aebf81f4a4 100644
--- a/sound/soc/codecs/cs35l56-shared.c
+++ b/sound/soc/codecs/cs35l56-shared.c
@@ -50,16 +50,14 @@ EXPORT_SYMBOL_NS_GPL(cs35l56_set_asp_defaults, "SND_SOC_CS35L56_SHARED");
static const struct reg_sequence cs35l56_patch[] = {
{ CS35L56_IRQ1_MASK_18, 0x1f7df0ff },
-};
-
-static const struct reg_sequence cs35l56_patch_fw[] = {
/* These are not reset by a soft-reset, so patch to defaults. */
{ CS35L56_MAIN_RENDER_USER_MUTE, 0x00000000 },
{ CS35L56_MAIN_RENDER_USER_VOLUME, 0x00000000 },
{ CS35L56_MAIN_POSTURE_NUMBER, 0x00000000 },
};
-static const struct reg_sequence cs35l63_patch_fw[] = {
+static const struct reg_sequence cs35l63_patch[] = {
+ { CS35L56_IRQ1_MASK_18, 0x1f7df0ff },
/* These are not reset by a soft-reset, so patch to defaults. */
{ CS35L63_MAIN_RENDER_USER_MUTE, 0x00000000 },
{ CS35L63_MAIN_RENDER_USER_VOLUME, 0x00000000 },
@@ -68,31 +66,19 @@ static const struct reg_sequence cs35l63_patch_fw[] = {
int cs35l56_set_patch(struct cs35l56_base *cs35l56_base)
{
- int ret;
-
- ret = regmap_register_patch(cs35l56_base->regmap, cs35l56_patch,
- ARRAY_SIZE(cs35l56_patch));
- if (ret)
- return ret;
-
-
switch (cs35l56_base->type) {
case 0x54:
case 0x56:
case 0x57:
- ret = regmap_register_patch(cs35l56_base->regmap, cs35l56_patch_fw,
- ARRAY_SIZE(cs35l56_patch_fw));
- break;
+ return regmap_register_patch(cs35l56_base->regmap, cs35l56_patch,
+ ARRAY_SIZE(cs35l56_patch));
case 0x63:
case 0x62:
- ret = regmap_register_patch(cs35l56_base->regmap, cs35l63_patch_fw,
- ARRAY_SIZE(cs35l63_patch_fw));
- break;
+ return regmap_register_patch(cs35l56_base->regmap, cs35l63_patch,
+ ARRAY_SIZE(cs35l63_patch));
default:
- break;
+ return 0;
}
-
- return ret;
}
EXPORT_SYMBOL_NS_GPL(cs35l56_set_patch, "SND_SOC_CS35L56_SHARED");
--
2.47.3
next prev parent reply other threads:[~2026-11-20 11:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 11:04 [PATCH 0/4] ASoC: cs35l56: Prepare for SDCA Companion Amp Richard Fitzgerald
2026-11-20 11:04 ` [PATCH 1/4] ASoC: cs35l56: Remove SDW1 TX source controls and widgets Richard Fitzgerald
2026-11-20 11:04 ` [PATCH 2/4] ASoC: cs35l56: Rename the DP3 DAI to cs35l56-ot127 Richard Fitzgerald
2026-11-20 11:04 ` Richard Fitzgerald [this message]
2026-11-20 11:04 ` [PATCH 4/4] ASoC: cs35l56: Add test that probe() doesn't write SDW mux registers Richard Fitzgerald
2026-11-20 12:48 ` [PATCH 0/4] ASoC: cs35l56: 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=20261120110441.2163567-4-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®