ASoC: soc-component: move snd_soc_component_cache_sync() to soc-component.c

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>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
Link: https://patch.msgid.link/87cxtdyol9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2026-10-14 02:59:14 +00:00 committed by Mark Brown
parent 5c90483441
commit 3f78fa3893
No known key found for this signature in database
GPG Key ID: 2FEF73B0B3D03889
2 changed files with 19 additions and 13 deletions

View File

@ -273,19 +273,6 @@ struct snd_soc_component {
dai = _dai, _dai = snd_soc_dai_from_list(snd_soc_dai_to_list(_dai)->next))
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_new(struct device *dev, const char *name,
const struct snd_soc_component_driver *driver);
int snd_soc_component_register(struct snd_soc_component *component,
@ -343,6 +330,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);
@ -455,4 +443,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 */

View File

@ -391,6 +391,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
/**