From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org
Subject: [PATCH 09/14] ASoC: soc-component: move snd_soc_component_cache_sync() to soc-component.c
Date: Tue, 29 Sep 2026 05:30:09 +0000 [thread overview]
Message-ID: <87cxtweiam.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87pkxweibu.wl-kuninori.morimoto.gx@renesas.com>
struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.
Move snd_soc_component_cache_sync() to soc-component.c
It renames function name
- snd_soc_component_cache_sync()
+ snd_soc_component_regmap_cache_sync()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-component.h | 16 ++++------------
sound/soc/soc-component.c | 15 +++++++++++++++
2 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 306d61b2cb5eb..0f5738154a23b 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -274,18 +274,6 @@ struct snd_soc_component {
struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component *component);
-/**
- * snd_soc_component_cache_sync() - Sync the register cache with the hardware
- * @component: COMPONENT to sync
- *
- * Note: This function will call regcache_sync()
- */
-static inline int snd_soc_component_cache_sync(
- struct snd_soc_component *component)
-{
- return regcache_sync(component->regmap);
-}
-
struct snd_soc_component *snd_soc_component_alloc(struct device *dev);
void snd_soc_component_set_name(struct snd_soc_component *component, const char *name);
@@ -340,6 +328,7 @@ int snd_soc_component_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level);
int snd_soc_component_regmap_val_bytes(struct snd_soc_component *component);
+int snd_soc_component_regmap_cache_sync(struct snd_soc_component *component);
#ifdef CONFIG_REGMAP
void snd_soc_component_init_regmap(struct snd_soc_component *component,
struct regmap *regmap);
@@ -452,4 +441,7 @@ int snd_soc_pcm_component_ack(struct snd_pcm_substream *substream);
void snd_soc_pcm_component_delay(struct snd_pcm_substream *substream,
snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
+/* REMOVE ME */
+#define snd_soc_component_cache_sync snd_soc_component_regmap_cache_sync
+
#endif /* __SOC_COMPONENT_H */
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 9b89061e4675c..00f7d412097f1 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -410,6 +410,21 @@ int snd_soc_component_regmap_val_bytes(struct snd_soc_component *component)
}
EXPORT_SYMBOL_GPL(snd_soc_component_regmap_val_bytes);
+/**
+ * snd_soc_component_regmap_cache_sync() - Sync the register cache with the hardware
+ * @component: COMPONENT to sync
+ *
+ * Note: This function will call regcache_sync()
+ */
+int snd_soc_component_regmap_cache_sync(struct snd_soc_component *component)
+{
+ if (!component->regmap)
+ return 0;
+
+ return regcache_sync(component->regmap);
+}
+EXPORT_SYMBOL_GPL(snd_soc_component_regmap_cache_sync);
+
#ifdef CONFIG_REGMAP
/**
--
2.53.0
next prev parent reply other threads:[~2026-09-29 5:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 5:29 [PATCH 00/14] ASoC: soc-component: move snd_soc_component_xxx() to soc-component.c Kuninori Morimoto
2026-09-29 5:29 ` [PATCH 01/14] ASoC: soc-component: tidyup be_hw_params_fixup() define position Kuninori Morimoto
2026-09-29 5:29 ` [PATCH 02/14] ASoC: soc-component: replace bool member to bit field Kuninori Morimoto
2026-09-29 5:29 ` [PATCH 03/14] ASoC: soc-component: move snd_soc_add_component_controls() Kuninori Morimoto
2026-09-29 5:29 ` [PATCH 04/14] ASoC: soc-component: move snd_soc_component_fixup_controls() Kuninori Morimoto
2026-09-29 5:29 ` [PATCH 05/14] ASoC: soc-component: move soc_component_to_node() to soc-component.c Kuninori Morimoto
2026-09-29 5:29 ` [PATCH 06/14] ASoC: soc-component: move snd_soc_is_matching_component() " Kuninori Morimoto
2026-09-29 5:30 ` [PATCH 07/14] ASoC: soc-component: move soc_{probe/remove}_component() " Kuninori Morimoto
2026-09-29 8:24 ` Alvin Šipraga
2026-09-29 23:36 ` Kuninori Morimoto
2026-09-29 5:30 ` [PATCH 08/14] ASoC: soc-component: move snd_soc_component_to_dapm() " Kuninori Morimoto
2026-09-29 5:30 ` Kuninori Morimoto [this message]
2026-09-29 5:30 ` [PATCH 10/14] ASoC: soc-component: move snd_soc_component_active() " Kuninori Morimoto
2026-09-29 5:30 ` [PATCH 11/14] ASoC: soc-component: move component_list " Kuninori Morimoto
2026-09-29 5:30 ` [PATCH 12/14] ASoC: soc-component: move snd_soc_lookup_component() " Kuninori Morimoto
2026-09-29 5:30 ` [PATCH 13/14] ASoC: soc-component: move __snd_soc_of_put_component() " Kuninori Morimoto
2026-09-29 5:30 ` [PATCH 14/14] ASoC: soc-component: rename snd_soc_component_async_complete() Kuninori Morimoto
2026-09-29 8:25 ` [PATCH 00/14] ASoC: soc-component: move snd_soc_component_xxx() to soc-component.c Alvin Šipraga
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=87cxtweiam.wl-kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=broonie@kernel.org \
--cc=linux-sound@vger.kernel.org \
/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