4 Jul
2011
4 Jul
'11
11:14 p.m.
On 04/07/11 20:41, Mark Brown wrote:
On Mon, Jul 04, 2011 at 11:10:15AM +0100, Liam Girdwood wrote:
+int snd_soc_platform_read(struct snd_soc_platform *platform,
unsigned int reg)
+{
- unsigned int ret;
- if (!platform->driver->read) {
dev_err(platform->dev, "platform has no read back\n");
return -1;
- }
- ret = platform->driver->read(platform, reg);
- dev_dbg(platform->dev, "read %x => %x\n", reg, ret);
We should add tracepoints into these as well.
Ah, forgot to send that one with this one. It's on it's way now ;)
+int snd_soc_platform_write(struct snd_soc_platform *platform,
unsigned int reg, unsigned int val)
+{
- if (!platform->driver->write) {
dev_err(platform->dev, "platform has no write back\n");
return -1;
Could return -EINVAL or something here - it's not like read where we're mixing with the in band data.
I was thinking that too, but consistency with the codec IO would mean return -1.
However, I've no real preference. I happy to change to EINVAL.
Liam