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>,
<linux-kernel@vger.kernel.org>, <linux-sound@vger.kernel.org>,
<linux-tegra@vger.kernel.org>, Sheetal <sheetal@nvidia.com>
Subject: [RFC PATCH 2/2] ASoC: tegra: Enable cache_default_is_zero for audio drivers
Date: Tue, 6 Jan 2026 19:38:27 +0530 [thread overview]
Message-ID: <20260106140827.3771375-3-sheetal@nvidia.com> (raw)
In-Reply-To: <20260106140827.3771375-1-sheetal@nvidia.com>
From: Sheetal <sheetal@nvidia.com>
Set cache_default_is_zero flag in Tegra audio driver regmap configurations.
Tegra APE hardware has numerous registers with zero power-on-reset
values. Use cache_default_is_zero to mark cache entries as valid instead
of adding all these registers to reg_defaults arrays.
This patch depends on:
https://patchwork.ozlabs.org/project/linux-tegra/patch/20251217132524.2844499-1-sheetal@nvidia.com/
Signed-off-by: Sheetal <sheetal@nvidia.com>
---
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 +
14 files changed, 22 insertions(+)
diff --git a/sound/soc/tegra/tegra186_asrc.c b/sound/soc/tegra/tegra186_asrc.c
index 2c0220e14a57..2f3382a674e7 100644
--- a/sound/soc/tegra/tegra186_asrc.c
+++ b/sound/soc/tegra/tegra186_asrc.c
@@ -951,6 +951,7 @@ static const struct regmap_config tegra186_asrc_regmap_config = {
.reg_defaults = tegra186_asrc_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra186_asrc_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct tegra_asrc_soc_data soc_data_tegra186 = {
diff --git a/sound/soc/tegra/tegra186_dspk.c b/sound/soc/tegra/tegra186_dspk.c
index a762150db802..84c54e710cff 100644
--- a/sound/soc/tegra/tegra186_dspk.c
+++ b/sound/soc/tegra/tegra186_dspk.c
@@ -468,6 +468,7 @@ static const struct regmap_config tegra186_dspk_regmap = {
.reg_defaults = tegra186_dspk_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra186_dspk_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct of_device_id tegra186_dspk_of_match[] = {
diff --git a/sound/soc/tegra/tegra210_admaif.c b/sound/soc/tegra/tegra210_admaif.c
index f9f6040c4e34..bb2f42560065 100644
--- a/sound/soc/tegra/tegra210_admaif.c
+++ b/sound/soc/tegra/tegra210_admaif.c
@@ -242,6 +242,7 @@ static const struct regmap_config tegra210_admaif_regmap_config = {
.reg_defaults = tegra210_admaif_reg_defaults,
.num_reg_defaults = TEGRA210_ADMAIF_CHANNEL_COUNT * 6 + 1,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra186_admaif_regmap_config = {
@@ -255,6 +256,7 @@ static const struct regmap_config tegra186_admaif_regmap_config = {
.reg_defaults = tegra186_admaif_reg_defaults,
.num_reg_defaults = TEGRA186_ADMAIF_CHANNEL_COUNT * 6 + 1,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra264_admaif_regmap_config = {
@@ -268,6 +270,7 @@ static const struct regmap_config tegra264_admaif_regmap_config = {
.reg_defaults = tegra264_admaif_reg_defaults,
.num_reg_defaults = TEGRA264_ADMAIF_CHANNEL_COUNT * 6 + 1,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static int tegra_admaif_runtime_suspend(struct device *dev)
diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c
index 6c9a410085bc..dd6261a0442c 100644
--- a/sound/soc/tegra/tegra210_adx.c
+++ b/sound/soc/tegra/tegra210_adx.c
@@ -626,6 +626,7 @@ static const struct regmap_config tegra210_adx_regmap_config = {
.reg_defaults = tegra210_adx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_adx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra264_adx_regmap_config = {
@@ -639,6 +640,7 @@ static const struct regmap_config tegra264_adx_regmap_config = {
.reg_defaults = tegra264_adx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra264_adx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct tegra210_adx_soc_data soc_data_tegra210 = {
diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c
index e795907a3963..4cf21a9aca32 100644
--- a/sound/soc/tegra/tegra210_ahub.c
+++ b/sound/soc/tegra/tegra210_ahub.c
@@ -2078,6 +2078,7 @@ static const struct regmap_config tegra210_ahub_regmap_config = {
.reg_stride = 4,
.max_register = TEGRA210_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra186_ahub_regmap_config = {
@@ -2086,6 +2087,7 @@ static const struct regmap_config tegra186_ahub_regmap_config = {
.reg_stride = 4,
.max_register = TEGRA186_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra264_ahub_regmap_config = {
@@ -2095,6 +2097,7 @@ static const struct regmap_config tegra264_ahub_regmap_config = {
.writeable_reg = tegra264_ahub_wr_reg,
.max_register = TEGRA264_MAX_REGISTER_ADDR,
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct tegra_ahub_soc_data soc_data_tegra210 = {
diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c
index c94f8c84e04f..0a9402102ba1 100644
--- a/sound/soc/tegra/tegra210_amx.c
+++ b/sound/soc/tegra/tegra210_amx.c
@@ -655,6 +655,7 @@ static const struct regmap_config tegra210_amx_regmap_config = {
.reg_defaults = tegra210_amx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_amx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra194_amx_regmap_config = {
@@ -668,6 +669,7 @@ static const struct regmap_config tegra194_amx_regmap_config = {
.reg_defaults = tegra210_amx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_amx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct regmap_config tegra264_amx_regmap_config = {
@@ -681,6 +683,7 @@ static const struct regmap_config tegra264_amx_regmap_config = {
.reg_defaults = tegra264_amx_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra264_amx_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct tegra210_amx_soc_data soc_data_tegra210 = {
diff --git a/sound/soc/tegra/tegra210_dmic.c b/sound/soc/tegra/tegra210_dmic.c
index 66fff53aeaa6..d87f29ce1daa 100644
--- a/sound/soc/tegra/tegra210_dmic.c
+++ b/sound/soc/tegra/tegra210_dmic.c
@@ -484,6 +484,7 @@ static const struct regmap_config tegra210_dmic_regmap_config = {
.reg_defaults = tegra210_dmic_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_dmic_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static int tegra210_dmic_probe(struct platform_device *pdev)
diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c
index b91e0e6cd7fe..0dc853645905 100644
--- a/sound/soc/tegra/tegra210_i2s.c
+++ b/sound/soc/tegra/tegra210_i2s.c
@@ -998,6 +998,7 @@ static const struct regmap_config tegra210_regmap_conf = {
.reg_defaults = tegra210_i2s_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_i2s_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
/*
@@ -1045,6 +1046,7 @@ static const struct regmap_config tegra264_regmap_conf = {
.reg_defaults = tegra264_i2s_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra264_i2s_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static int tegra210_i2s_probe(struct platform_device *pdev)
diff --git a/sound/soc/tegra/tegra210_mbdrc.c b/sound/soc/tegra/tegra210_mbdrc.c
index 09fe3c5cf540..83906e484343 100644
--- a/sound/soc/tegra/tegra210_mbdrc.c
+++ b/sound/soc/tegra/tegra210_mbdrc.c
@@ -764,6 +764,7 @@ static const struct regmap_config tegra210_mbdrc_regmap_cfg = {
.reg_defaults = tegra210_mbdrc_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_mbdrc_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
int tegra210_mbdrc_hw_params(struct snd_soc_component *cmpnt)
diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c
index ff8e9f2d7abf..c8157388ad70 100644
--- a/sound/soc/tegra/tegra210_mixer.c
+++ b/sound/soc/tegra/tegra210_mixer.c
@@ -609,6 +609,7 @@ static const struct regmap_config tegra210_mixer_regmap_config = {
.reg_defaults = tegra210_mixer_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_mixer_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct of_device_id tegra210_mixer_of_match[] = {
diff --git a/sound/soc/tegra/tegra210_mvc.c b/sound/soc/tegra/tegra210_mvc.c
index 779d4c199da9..f3a5048dcf7a 100644
--- a/sound/soc/tegra/tegra210_mvc.c
+++ b/sound/soc/tegra/tegra210_mvc.c
@@ -700,6 +700,7 @@ static const struct regmap_config tegra210_mvc_regmap_config = {
.reg_defaults = tegra210_mvc_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_mvc_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct of_device_id tegra210_mvc_of_match[] = {
diff --git a/sound/soc/tegra/tegra210_ope.c b/sound/soc/tegra/tegra210_ope.c
index 27db70af2746..c7ac94f0a711 100644
--- a/sound/soc/tegra/tegra210_ope.c
+++ b/sound/soc/tegra/tegra210_ope.c
@@ -298,6 +298,7 @@ static const struct regmap_config tegra210_ope_regmap_config = {
.reg_defaults = tegra210_ope_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_ope_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static int tegra210_ope_probe(struct platform_device *pdev)
diff --git a/sound/soc/tegra/tegra210_peq.c b/sound/soc/tegra/tegra210_peq.c
index 9a05e6913276..8d4821a4cc58 100644
--- a/sound/soc/tegra/tegra210_peq.c
+++ b/sound/soc/tegra/tegra210_peq.c
@@ -307,6 +307,7 @@ static const struct regmap_config tegra210_peq_regmap_config = {
.reg_defaults = tegra210_peq_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_peq_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
void tegra210_peq_restore(struct regmap *regmap, u32 *biquad_gains,
diff --git a/sound/soc/tegra/tegra210_sfc.c b/sound/soc/tegra/tegra210_sfc.c
index d6341968bebe..89208820d451 100644
--- a/sound/soc/tegra/tegra210_sfc.c
+++ b/sound/soc/tegra/tegra210_sfc.c
@@ -3570,6 +3570,7 @@ static const struct regmap_config tegra210_sfc_regmap_config = {
.reg_defaults = tegra210_sfc_reg_defaults,
.num_reg_defaults = ARRAY_SIZE(tegra210_sfc_reg_defaults),
.cache_type = REGCACHE_FLAT,
+ .cache_default_is_zero = true,
};
static const struct of_device_id tegra210_sfc_of_match[] = {
--
2.34.1
prev parent reply other threads:[~2026-01-06 14:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 14:08 [RFC PATCH 0/2] regmap: Add cache_default_is_zero flag for flat cache Sheetal .
2026-01-06 14:08 ` [RFC PATCH 1/2] " Sheetal .
2026-01-06 15:12 ` Mark Brown
2026-01-07 6:55 ` Sheetal .
2026-01-07 11:20 ` Mark Brown
2026-01-06 21:19 ` Sander Vanheule
2026-01-07 7:30 ` Sheetal .
2026-01-06 14:08 ` Sheetal . [this message]
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=20260106140827.3771375-3-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=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