aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-11-05 20:48:52 -0500
committerMark Brown <broonie@kernel.org>2017-11-08 16:19:38 -0500
commit474db2c9991cc624e7415770c8b80fc7acf40cdd (patch)
treefc0e16d5cdbc9ed1f32508e2bbd4f2e69ced076a
parent10e079d9874802c35dc3f51af922531e5423a6bf (diff)
ASoC: add snd_soc_component_cache_sync()
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>
-rw-r--r--include/sound/soc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index f69b13c4a641..4961f4455b65 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1540,6 +1540,18 @@ static inline int snd_soc_cache_sync(struct snd_soc_codec *codec)
1540 return regcache_sync(codec->component.regmap); 1540 return regcache_sync(codec->component.regmap);
1541} 1541}
1542 1542
1543/**
1544 * snd_soc_component_cache_sync() - Sync the register cache with the hardware
1545 * @component: COMPONENT to sync
1546 *
1547 * Note: This function will call regcache_sync()
1548 */
1549static inline int snd_soc_component_cache_sync(
1550 struct snd_soc_component *component)
1551{
1552 return regcache_sync(component->regmap);
1553}
1554
1543/* component IO */ 1555/* component IO */
1544int snd_soc_component_read(struct snd_soc_component *component, 1556int snd_soc_component_read(struct snd_soc_component *component,
1545 unsigned int reg, unsigned int *val); 1557 unsigned int reg, unsigned int *val);