Skip to content

RFC regmap: reg_default_cb for flat cache defaults

Sheetal . linux-sound linux-tegra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 RFC Latest4 patches 5 repliesIn review

Changes in v3 from the cover letter

- Add AHUB writeable_reg filtering for RX holes.
- Replace flat_cache_default_is_zero flag with reg_default_cb callback
- Load defaults at regcache init using reg_default_cb
- Set reg_default_cb in Tegra ASoC drivers
- Add KUnit coverage for reg_default_cb callback

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ASoC: tegra: Add AHUB writeable_reg for RX holessound/soc/tegra/tegra210_ahub.c sound/soc/tegra/tegra210_ahub.h+87 -01 reply
2/4regmap: Add reg_default_cb callback for flat cache defaultsdrivers/base/regmap/internal.h drivers/base/regmap/regcache-flat.c drivers/base/regmap/regcache.c +2 more+40 -11 reply
3/4ASoC: tegra: set reg_default_cb callbacksound/soc/tegra/tegra186_asrc.c sound/soc/tegra/tegra186_dspk.c sound/soc/tegra/tegra210_admaif.c +11 more+22 -01 reply
4/4regmap: add KUnit coverage for reg_default_cb callbackdrivers/base/regmap/regmap-kunit.c+91 -00 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchJon Hunter
1/4R-b T-b
2/4R-b T-b
3/4R-b T-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [RFC PATCH v3 0/4] regmap: reg_default_cb for flat cache defaults

From: sheetal <[email protected]>

This series adds a reg_default_cb callback for REGCACHE_FLAT to provide defaults for registers not listed in reg_defaults. Defaults are loaded eagerly during regcache init and the callback can use writeable_reg to filter valid addresses and avoid holes.

Tegra ASoC drivers set reg_default_cb and add writeable_reg filtering for AHUB RX holes to prevent invalid addresses from being marked valid.

Changes in v3:
- Add AHUB writeable_reg filtering for RX holes.
- Replace flat_cache_default_is_zero flag with reg_default_cb callback
- Load defaults at regcache init using reg_default_cb
- Set reg_default_cb in Tegra ASoC drivers
- Add KUnit coverage for reg_default_cb callback

Note:
"ASoC: tegra: set reg_default_cb callback" patch depends on "ASoC: tegra: Add AHUB writeable_reg for RX holes" patch, hence included in this series.

Sheetal (4):
ASoC: tegra: Add AHUB writeable_reg for RX holes
regmap: Add reg_default_cb callback for flat cache defaults
ASoC: tegra: set reg_default_cb callback
regmap: add KUnit coverage for reg_default_cb callback

 drivers/base/regmap/internal.h      |  3 +
 drivers/base/regmap/regcache-flat.c | 19 ++++++
 drivers/base/regmap/regcache.c      |  3 +-
 drivers/base/regmap/regmap-kunit.c  | 91 +++++++++++++++++++++++++++++
 drivers/base/regmap/regmap.c        |  2 +
 include/linux/regmap.h              | 14 +++++
 sound/soc/tegra/tegra186_asrc.c     |  1 +
 sound/soc/tegra/tegra186_dspk.c     |  1 +
 sound/soc/tegra/tegra210_admaif.c   |  3 +
 sound/soc/tegra/tegra210_adx.c      |  2 +
 sound/soc/tegra/tegra210_ahub.c     | 60 +++++++++++++++++++
 sound/soc/tegra/tegra210_ahub.h     | 30 ++++++++++
 sound/soc/tegra/tegra210_amx.c      |  3 +
 sound/soc/tegra/tegra210_dmic.c     |  1 +
 sound/soc/tegra/tegra210_i2s.c      |  2 +
 sound/soc/tegra/tegra210_mbdrc.c    |  1 +
 sound/soc/tegra/tegra210_mixer.c    |  1 +
 sound/soc/tegra/tegra210_mvc.c      |  1 +
 sound/soc/tegra/tegra210_ope.c      |  1 +
 sound/soc/tegra/tegra210_peq.c      |  1 +
 sound/soc/tegra/tegra210_sfc.c      |  1 +
 21 files changed, 240 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1