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>
This commit is contained in:
Kuninori Morimoto 2017-11-06 01:48:52 +00:00 committed by Mark Brown
parent 10e079d987
commit 474db2c999
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 12 additions and 0 deletions

View File

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