Commit c3753707 authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 3f58fd84
...@@ -639,17 +639,9 @@ struct soc_enum { ...@@ -639,17 +639,9 @@ struct soc_enum {
}; };
/* codec IO */ /* codec IO */
static inline unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
unsigned int reg) unsigned int snd_soc_write(struct snd_soc_codec *codec,
{ unsigned int reg, unsigned int val);
return codec->driver->read(codec, reg);
}
static inline unsigned int snd_soc_write(struct snd_soc_codec *codec,
unsigned int reg, unsigned int val)
{
return codec->driver->write(codec, reg, val);
}
/* device driver data */ /* device driver data */
......
...@@ -1877,6 +1877,25 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec) ...@@ -1877,6 +1877,25 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec)
} }
EXPORT_SYMBOL_GPL(snd_soc_free_ac97_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 * snd_soc_update_bits - update codec register bits
* @codec: audio codec * @codec: audio codec
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment