public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: "Sheetal ." <sheetal@nvidia.com>
To: Mark Brown <broonie@kernel.org>
Cc: Sander Vanheule <sander@svanheule.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Mohan kumar <mkumard@nvidia.com>, <linux-kernel@vger.kernel.org>,
	<linux-sound@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	Sheetal <sheetal@nvidia.com>
Subject: [RFC PATCH v2 0/3] regmap: Add flat_cache_default_is_zero flag for flat cache
Date: Mon, 12 Jan 2026 09:58:38 +0530	[thread overview]
Message-ID: <20260112042841.51799-1-sheetal@nvidia.com> (raw)

From: Sheetal <sheetal@nvidia.com>

This patch series adds a flat_cache_default_is_zero flag for REGCACHE_FLAT
that marks cache entries as valid on first read.

For hardware with zero power-on-reset registers, this avoids the need
to add all such registers to reg_defaults (maintenance burden, code
bloat, no functional benefit) just to set the validity bits.

By setting valid bits on read rather than at init, only accessed
registers are marked valid. This keeps regcache_sync scope minimal
and avoids writes to unused registers or holes.

Changes in v2:
- Renamed flag from cache_default_is_zero to flat_cache_default_is_zero
  to make it explicit that this is specific to REGCACHE_FLAT
- Added KUnit test coverage (patch 2/3)
- Updated commit message to explain why valid bits are set on first
  read rather than at init time

Sheetal (3):
  regmap: Add flat_cache_default_is_zero flag for flat cache
  regmap: Add KUnit test for flat_cache_default_is_zero
  ASoC: tegra: Enable flat_cache_default_is_zero for audio drivers

 drivers/base/regmap/internal.h      |  2 ++
 drivers/base/regmap/regcache-flat.c | 12 ++++++++----
 drivers/base/regmap/regcache.c      |  1 +
 drivers/base/regmap/regmap-kunit.c  | 93 ++++++++++++++++++++++++++++++
 include/linux/regmap.h              |  1 +
 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     |  3 +++
 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 +
 19 files changed, 127 insertions(+), 4 deletions(-)

-- 
2.34.1


             reply	other threads:[~2026-01-12  4:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12  4:28 Sheetal . [this message]
2026-01-12  4:28 ` [RFC PATCH v2 1/3] regmap: Add flat_cache_default_is_zero flag for flat cache Sheetal .
2026-01-12 19:09   ` Sander Vanheule
2026-01-12 21:45     ` Mark Brown
2026-01-12  4:28 ` [RFC PATCH v2 2/3] regmap: Add KUnit test for flat_cache_default_is_zero Sheetal .
2026-01-12  4:28 ` [RFC PATCH v2 3/3] ASoC: tegra: Enable flat_cache_default_is_zero for audio drivers Sheetal .
2026-01-12 12:26   ` Mark Brown
2026-01-12 12:53     ` Sheetal .
2026-01-12 13:32       ` 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=20260112042841.51799-1-sheetal@nvidia.com \
    --to=sheetal@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mkumard@nvidia.com \
    --cc=perex@perex.cz \
    --cc=rafael@kernel.org \
    --cc=sander@svanheule.net \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.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