ASoC: add snd_soc_component_cache_sync()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 6 Nov 2017 01:48:52 +0000 (01:48 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 8 Nov 2017 21:19:38 +0000 (21:19 +0000)
snd_soc_cache_sync() (= for Codec) will be removed soon.
This patch Component version of it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h

index f69b13c..4961f44 100644 (file)
@@ -1540,6 +1540,18 @@ static inline int snd_soc_cache_sync(struct snd_soc_codec *codec)
        return regcache_sync(codec->component.regmap);
 }
 
+/**
+ * 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);
+}
+
 /* component IO */
 int snd_soc_component_read(struct snd_soc_component *component,
        unsigned int reg, unsigned int *val);