]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: cs35l56: Use standard SoundWire regmap implementation
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 21 May 2026 11:54:20 +0000 (12:54 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 21 May 2026 23:17:13 +0000 (00:17 +0100)
commit4e2310f14a43b88e2dbabfb2b08c086ca871198b
treec426f79a9a2142e15b6cf982bfd7dbb4b6bfcda1
parent371d1e3a01f30c82e662e8600b818bc25c703653
ASoC: cs35l56: Use standard SoundWire regmap implementation

Use the regmap_sdw implementation for SoundWire instead of
re-implementing the low-level bus transactions in cs35l56-sdw.c

The cs35l56 registers are big-endian on I2C and SPI but little-endian
over SoundWire. The firmware files are all big-endian and contain opaque
blobs in big-endian order. So these must be endian-swapped to transfer
over SoundWire. A custom regmap bus implementation is used to do this
endian-swapping.

The original implementation of this custom regmap bus was a complete bus
backend, performing the endian swapping and low-level SoundWire bus
read/write.

This commit changes the custom regmap bus to only perform the endian-swap.
It uses an underlying simple uncached regmap_sdw bus to deal with
transferring the 32-bit registers over the SoundWire bus. Although this
adds a small amount of overhead, from passing through the regmap APIs
twice, it avoids having a local duplicate implementation of what regmap_sdw
already does.

The slow-read handling for OTP registers must access 8-bit SoundWire
registers so it still uses low-level SoundWire bus reads.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260521115420.978616-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/Kconfig
sound/soc/codecs/cs35l56-sdw.c
sound/soc/codecs/cs35l56.h