diff options
author | Mark Brown <broonie@kernel.org> | 2014-12-08 13:11:44 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-08 13:11:44 +0000 |
commit | 3ee3f454632547a8299c16156c3fefcc2a05726c (patch) | |
tree | 82d460e48c73ffafacb07a8718c49f41f9789bbb /include | |
parent | 063e01a29b7a8a74b622dd586831e2de6cce8064 (diff) | |
parent | 427d204c86e095bb91eb8af381bd90a48376a860 (diff) | |
download | linux-3ee3f454632547a8299c16156c3fefcc2a05726c.tar.bz2 |
Merge remote-tracking branch 'asoc/topic/cache' into asoc-next
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/soc.h | 19 | ||||
-rw-r--r-- | include/trace/events/asoc.h | 25 |
2 files changed, 12 insertions, 32 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 7ba7130037a0..fadcb351f3e1 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -409,13 +409,9 @@ int devm_snd_soc_register_component(struct device *dev, const struct snd_soc_component_driver *cmpnt_drv, struct snd_soc_dai_driver *dai_drv, int num_dai); void snd_soc_unregister_component(struct device *dev); -int snd_soc_cache_sync(struct snd_soc_codec *codec); int snd_soc_cache_init(struct snd_soc_codec *codec); int snd_soc_cache_exit(struct snd_soc_codec *codec); -int snd_soc_cache_write(struct snd_soc_codec *codec, - unsigned int reg, unsigned int value); -int snd_soc_cache_read(struct snd_soc_codec *codec, - unsigned int reg, unsigned int *value); + int snd_soc_platform_read(struct snd_soc_platform *platform, unsigned int reg); int snd_soc_platform_write(struct snd_soc_platform *platform, @@ -791,13 +787,11 @@ struct snd_soc_codec { unsigned int ac97_registered:1; /* Codec has been AC97 registered */ unsigned int ac97_created:1; /* Codec has been created by SoC */ unsigned int cache_init:1; /* codec cache has been initialized */ - u32 cache_sync; /* Cache needs to be synced to hardware */ /* codec IO */ void *control_data; /* codec control (i2c/3wire) data */ hw_write_t hw_write; void *reg_cache; - struct mutex cache_rw_mutex; /* component */ struct snd_soc_component component; @@ -1264,6 +1258,17 @@ unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int val); +/** + * snd_soc_cache_sync() - Sync the register cache with the hardware + * @codec: CODEC to sync + * + * Note: This function will call regcache_sync() + */ +static inline int snd_soc_cache_sync(struct snd_soc_codec *codec) +{ + return regcache_sync(codec->component.regmap); +} + /* component IO */ int snd_soc_component_read(struct snd_soc_component *component, unsigned int reg, unsigned int *val); diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h index b04ee7e5a466..88cf39d96d0f 100644 --- a/include/trace/events/asoc.h +++ b/include/trace/events/asoc.h @@ -288,31 +288,6 @@ TRACE_EVENT(snd_soc_jack_notify, TP_printk("jack=%s %x", __get_str(name), (int)__entry->val) ); -TRACE_EVENT(snd_soc_cache_sync, - - TP_PROTO(struct snd_soc_codec *codec, const char *type, - const char *status), - - TP_ARGS(codec, type, status), - - TP_STRUCT__entry( - __string( name, codec->component.name) - __string( status, status ) - __string( type, type ) - __field( int, id ) - ), - - TP_fast_assign( - __assign_str(name, codec->component.name); - __assign_str(status, status); - __assign_str(type, type); - __entry->id = codec->component.id; - ), - - TP_printk("codec=%s.%d type=%s status=%s", __get_str(name), - (int)__entry->id, __get_str(type), __get_str(status)) -); - #endif /* _TRACE_ASOC_H */ /* This part must be outside protection */ |