All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: core - Add platform read and write.
Date: Mon, 4 Jul 2011 12:41:41 -0700	[thread overview]
Message-ID: <20110704194140.GC32624@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1309774215-4083-1-git-send-email-lrg@ti.com>

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.

> +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.

  reply	other threads:[~2011-07-04 19:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04 10:10 [PATCH] ASoC: core - Add platform read and write Liam Girdwood
2011-07-04 19:41 ` Mark Brown [this message]
2011-07-04 21:14   ` Liam Girdwood
2011-07-04 22:34     ` Mark Brown
2011-07-04 19:41 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110704194140.GC32624@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.