From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <vkoul@kernel.org>
Cc: <yung-chuan.liao@linux.intel.com>,
<pierre-louis.bossart@linux.dev>, <Basavaraj.Hiregoudar@amd.com>,
<Sunil-kumar.Dommati@amd.com>, <venkataprasad.potturu@amd.com>,
<Syed.SabaKareem@amd.com>, <Mario.Limonciello@amd.com>,
<Richard.Gong@amd.com>, <Poojitha.N@amd.com>,
<linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Vijendar Mukunda" <Vijendar.Mukunda@amd.com>
Subject: [PATCH v3 00/11] soundwire: amd: introduce hw_ops dispatch and split driver into revision-specific files
Date: Sat, 7 Nov 2026 21:42:17 +0530 [thread overview]
Message-ID: <20261107161345.3411491-1-Vijendar.Mukunda@amd.com> (raw)
This is v3 of the AMD SoundWire manager driver refactor series. It
incorporates review feedback from v2 and extends the series with two
new patches that guard DAI and clock-stop paths by acp_rev.
Changes since v2:
- Add patch 10: guard DAI PCM caps by acp_rev in register_dais();
replaces bare stream->rates and stream->formats assignments with an
explicit switch/case returning -EINVAL for unrecognised revisions.
- Add patch 11: guard clock-stop register access by acp_rev in
amd_sdw_clock_stop(); replaces open-coded accesses with an explicit
switch/case returning -EINVAL for unrecognised revisions.
- Patch 4 extended: also rename pad control helpers introduced by the
fix series (amd_sdw_pad_ctrl_supported to
amd_acp63_sdw_pad_ctrl_supported, __amd_sdw_oe_update to
__amd_acp63_sdw_oe_update) to the amd_acp63_* prefix.
- Patch 8 updated: rename amd_enable_sdw_pads() to
amd_acp63_enable_sdw_pads() in amd_init.c; the CLK_STOP_MODE path
in amd_acp63_sdw_suspend() now gains the same interrupt-gate and
work-drain sequence present in the POWER_OFF_MODE paths;
amd_sdw_host_wake_enable_by_rev() is called in CLK_STOP_MODE to
disable wake signalling before clock stop.
- Patch 9: commit message reformatted as a bullet list for clarity;
amd_sdw_hw_init_ops() dispatch wrapper documented explicitly.
- Rebased on top of the AMD SoundWire fix series v5 (25 patches).
-Link to v2:
https://lore.kernel.org/all/20261013100306.2921771-2-Vijendar.Mukunda@amd.com/
Changes since v1:
- Patch 4 subject updated: "rename hardware backend symbols" (covers
functions, op-table instances, and the register-offset constant)
- Patch 6: removed the forward reference to "subsequent patches" from
the commit message; dropped WARN_ONCE guards from dispatch helpers
- Patch 7: commit message corrected; #include <linux/workqueue.h>
addition dropped (available transitively)
- Patch 8: amd_sdw_hw_init_ops() now uses a static const
struct amd_sdw_hw_ops instead of devm_kzalloc; amd_sdw_hw_init_ops()
moved after amd_sdw_manager_remove() with a forward declaration before
probe to resolve ordering
- Patch 9 (new): splits amd_manager.c into amd_manager_common.c
(shared revision-independent functions, analogous to cadence_master.c)
and renames what remains to amd_acp63_manager.c (ACP6.3/7.x register-
level backend, analogous to intel_auxdevice.c)
Series overview:
Patches 1-3 are preparatory: rename the manager-count macro to carry
the ACP6.3 scope, convert the pdevinfo/sdw_pdata and pdev arrays in
sdw_amd_probe_controller() from fixed-size stack arrays to heap
allocations sized by the ACP revision.
Patch 4 renames revision-specific hardware-access functions, op-table
instances, the manager register-offset constant, and pad control
helpers to the amd_acp63_*/ACP63_* prefix.
Patch 5 removes an unused define.
Patches 6-8 introduce and wire up the hw_ops dispatch framework:
patch 6 defines struct amd_sdw_hw_ops and the inline acp_*() dispatch
helpers; patch 7 converts the irq/work handlers to dispatch per
acp_rev to their ACP6.3-family implementations; patch 8 extracts PM
callbacks into hw_ops slots, renames amd_enable_sdw_pads() to
amd_acp63_enable_sdw_pads(), populates a static const
amd_acp63_hw_ops table, and converts all remaining direct
amd_acp63_*() call sites to use the acp_*() wrappers.
Patch 9 splits amd_manager.c: shared revision-independent functions
move to amd_manager_common.c and the ACP6.3/7.0/7.1/7.2 register-
level backend is renamed to amd_acp63_manager.c.
Patches 10-11 close two open-coded revision assumptions left after the
split: register_dais() and amd_sdw_clock_stop() replace bare accesses
with explicit switch/case blocks on acp_rev.
Dependencies:
This series applies on top of the AMD SoundWire fix series (v5,
25 patches) posted at:
https://lore.kernel.org/linux-sound/20261107154659.3358223-1-Vijendar.Mukunda@amd.com
Vijendar Mukunda (11):
soundwire: amd: rename AMD_SDW_MAX_MANAGER_COUNT macro
soundwire: amd: allocate pdevinfo and sdw_pdata by ACP revision in
probe
soundwire: amd: allocate sdw_amd_ctx pdev array dynamically
soundwire: amd: rename hardware backend symbols to amd_acp63_*()
prefix
soundwire: amd: remove unused AMD_SDW_MAX_FREQ_NUM define
soundwire: amd: introduce struct amd_sdw_hw_ops dispatch framework
soundwire: amd: dispatch irq/work handlers to per-revision functions
soundwire: amd: populate hw_ops and wire all call sites through
acp_*() helpers
soundwire: amd: extract shared functions into amd_manager_common.c
soundwire: amd: guard DAI PCM caps by acp_rev in register_dais()
soundwire: amd: guard clock-stop register access by acp_rev
drivers/soundwire/Makefile | 2 +-
.../{amd_manager.c => amd_acp63_manager.c} | 940 ++++--------------
drivers/soundwire/amd_init.c | 54 +-
drivers/soundwire/amd_manager.h | 255 +++--
drivers/soundwire/amd_manager_common.c | 822 +++++++++++++++
include/linux/soundwire/sdw_amd.h | 11 +-
6 files changed, 1249 insertions(+), 835 deletions(-)
rename drivers/soundwire/{amd_manager.c => amd_acp63_manager.c} (52%)
create mode 100644 drivers/soundwire/amd_manager_common.c
--
2.53.0
next reply other threads:[~2026-11-07 16:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 16:12 Vijendar Mukunda [this message]
2026-11-07 16:12 ` [PATCH v3 01/11] soundwire: amd: rename AMD_SDW_MAX_MANAGER_COUNT macro Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 02/11] soundwire: amd: allocate pdevinfo and sdw_pdata by ACP revision in probe Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 03/11] soundwire: amd: allocate sdw_amd_ctx pdev array dynamically Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 04/11] soundwire: amd: rename hardware backend symbols to amd_acp63_*() prefix Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 05/11] soundwire: amd: remove unused AMD_SDW_MAX_FREQ_NUM define Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 06/11] soundwire: amd: introduce struct amd_sdw_hw_ops dispatch framework Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 07/11] soundwire: amd: dispatch irq/work handlers to per-revision functions Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 08/11] soundwire: amd: populate hw_ops and wire all call sites through acp_*() helpers Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 09/11] soundwire: amd: extract shared functions into amd_manager_common.c Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 10/11] soundwire: amd: guard DAI PCM caps by acp_rev in register_dais() Vijendar Mukunda
2026-11-07 16:12 ` [PATCH v3 11/11] soundwire: amd: guard clock-stop register access by acp_rev Vijendar Mukunda
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=20261107161345.3411491-1-Vijendar.Mukunda@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Poojitha.N@amd.com \
--cc=Richard.Gong@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Syed.SabaKareem@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.dev \
--cc=venkataprasad.potturu@amd.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.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®