summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-01 15:41:57 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-03 13:41:53 -0400
commitc3753707991218aa2c18449a921847877533aa09 (patch)
tree10fcca7891e8885fe1fe5913bdac56f0c51567a1 /sound/soc/soc-core.c
parent3f58fd84b0c0bd482151259ee0d2921974e1fe4c (diff)
downloadlwn-c3753707991218aa2c18449a921847877533aa09.tar.gz
lwn-c3753707991218aa2c18449a921847877533aa09.zip
ASoC: Push snd_soc_write() and snd_soc_read() into the source file
Facilitating adding trace type stuff. For a first pass add some dev_dbg() statements into them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 614a8b30d87b..4360436ef035 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1877,6 +1877,25 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec)
}
EXPORT_SYMBOL_GPL(snd_soc_free_ac97_codec);
+unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg)
+{
+ unsigned int ret;
+
+ ret = codec->driver->read(codec, reg);
+ dev_dbg(codec->dev, "read %x => %x\n", reg, ret);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(snd_soc_read);
+
+unsigned int snd_soc_write(struct snd_soc_codec *codec,
+ unsigned int reg, unsigned int val)
+{
+ dev_dbg(codec->dev, "write %x = %x\n", reg, val);
+ return codec->driver->write(codec, reg, val);
+}
+EXPORT_SYMBOL_GPL(snd_soc_write);
+
/**
* snd_soc_update_bits - update codec register bits
* @codec: audio codec