drivers/base/regmap/regcache.c | 31 ++++ include/linux/regmap.h | 7 + include/sound/sdca_regmap.h | 31 ++++ sound/soc/sdca/Makefile | 2 +- sound/soc/sdca/sdca_regmap.c | 321 +++++++++++++++++++++++++++++++++ 5 files changed, 391 insertions(+), 1 deletion(-) create mode 100644 include/sound/sdca_regmap.h create mode 100644 sound/soc/sdca/sdca_regmap.c
This series is the next step of adding SDCA support. Here we add helper functions to allow drivers to easily use the SDCA DisCo information to create a register map for the device. The basic idea here is the code takes the list of SDCA controls parsed from DisCo and uses primarily the Access Mode to determine if the register should be marked as readable/writable etc. Further more some additional concepts such as DisCo Constants and Defaults are handled. There is some potential confusion, as DisCo Constants are handled as an entry in the regmap defaults table, whereas a DisCo Default is simply handled as a write to the register. Alas the naming confusion is an unavoidable result of the slight impedance mismatch between the two systems. Thanks, Charles Charles Keepax (4): regcache: Add support for sorting defaults arrays ASoC: SDCA: Add generic regmap SDCA helpers ASoC: SDCA: Add regmap helpers for parsing for DisCo Constant values ASoC: SDCA: Add helper to write out defaults and fixed values drivers/base/regmap/regcache.c | 31 ++++ include/linux/regmap.h | 7 + include/sound/sdca_regmap.h | 31 ++++ sound/soc/sdca/Makefile | 2 +- sound/soc/sdca/sdca_regmap.c | 321 +++++++++++++++++++++++++++++++++ 5 files changed, 391 insertions(+), 1 deletion(-) create mode 100644 include/sound/sdca_regmap.h create mode 100644 sound/soc/sdca/sdca_regmap.c -- 2.39.5
On Mon, 17 Feb 2025 14:01:55 +0000, Charles Keepax wrote:
> This series is the next step of adding SDCA support. Here we add
> helper functions to allow drivers to easily use the SDCA DisCo
> information to create a register map for the device.
>
> The basic idea here is the code takes the list of SDCA controls parsed
> from DisCo and uses primarily the Access Mode to determine if the
> register should be marked as readable/writable etc. Further more
> some additional concepts such as DisCo Constants and Defaults are
> handled. There is some potential confusion, as DisCo Constants are
> handled as an entry in the regmap defaults table, whereas a DisCo
> Default is simply handled as a write to the register. Alas the naming
> confusion is an unavoidable result of the slight impedance mismatch
> between the two systems.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/4] regcache: Add support for sorting defaults arrays
commit: fd80df352ba1884ce2b62dd8d9495582308101b7
[2/4] ASoC: SDCA: Add generic regmap SDCA helpers
commit: e3f7caf74b795621252e3c25b4a9fb6888336ef1
[3/4] ASoC: SDCA: Add regmap helpers for parsing for DisCo Constant values
commit: 28c12866c22c2826ccbd8c82dc353f02ab2deea5
[4/4] ASoC: SDCA: Add helper to write out defaults and fixed values
commit: c143755d8cce31e770234732ff23134993b0550f
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
On 2/17/25 08:01, Charles Keepax wrote: > This series is the next step of adding SDCA support. Here we add > helper functions to allow drivers to easily use the SDCA DisCo > information to create a register map for the device. Can you remind me where we ended-up in the discussion on one regmap per physical device or one regmap per function? The DisCo definition are all function-centric, but the physical SoundWire bus access for all read/writes is shared by all functions so having a single regmap isn't silly either. > The basic idea here is the code takes the list of SDCA controls parsed > from DisCo and uses primarily the Access Mode to determine if the > register should be marked as readable/writable etc. Further more > some additional concepts such as DisCo Constants and Defaults are > handled. There is some potential confusion, as DisCo Constants are > handled as an entry in the regmap defaults table, whereas a DisCo > Default is simply handled as a write to the register. Alas the naming > confusion is an unavoidable result of the slight impedance mismatch > between the two systems. > > Thanks, > Charles > > Charles Keepax (4): > regcache: Add support for sorting defaults arrays > ASoC: SDCA: Add generic regmap SDCA helpers > ASoC: SDCA: Add regmap helpers for parsing for DisCo Constant values > ASoC: SDCA: Add helper to write out defaults and fixed values The code looks fine, thanks! Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> > > drivers/base/regmap/regcache.c | 31 ++++ > include/linux/regmap.h | 7 + > include/sound/sdca_regmap.h | 31 ++++ > sound/soc/sdca/Makefile | 2 +- > sound/soc/sdca/sdca_regmap.c | 321 +++++++++++++++++++++++++++++++++ > 5 files changed, 391 insertions(+), 1 deletion(-) > create mode 100644 include/sound/sdca_regmap.h > create mode 100644 sound/soc/sdca/sdca_regmap.c >
On Thu, Feb 20, 2025 at 07:01:44AM -0600, Pierre-Louis Bossart wrote: > On 2/17/25 08:01, Charles Keepax wrote: > > This series is the next step of adding SDCA support. Here we add > > helper functions to allow drivers to easily use the SDCA DisCo > > information to create a register map for the device. > > Can you remind me where we ended-up in the discussion on one > regmap per physical device or one regmap per function? > > The DisCo definition are all function-centric, but the physical > SoundWire bus access for all read/writes is shared by all functions > so having a single regmap isn't silly either. > We haven't really fully resolved that yet, however, I have came to the conclusion that all the helper function bits I am currently adding are completely agnostic of the choice. So I think it makes most sense to address this once we are adding an actually driver component. That way we will have the most context for discussion. Thanks, Charles
© 2016 - 2025 Red Hat, Inc.