All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: lin_g <lin_g@o2.pl>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
	alsa-devel@alsa-project.org
Subject: Re: refreshing the reg cache in asoc driver
Date: Wed, 29 Sep 2010 18:52:15 +0100	[thread overview]
Message-ID: <20100929175215.GC19087@sirena.org.uk> (raw)
In-Reply-To: <17b6865a.5133de6e.4ca30a3c.3659c@o2.pl>

On Wed, Sep 29, 2010 at 11:43:24AM +0200, lin_g wrote:

> I'm writing the driver for wm8804 s/pdif transceiver. However, my

Note that Dimitrios just posted a driver for this to the list earlier
today, which is also available from opensource.wolfsonmicro.com.  It
would be best to work with this driver.

> problem is that I would like to refresh my register cache inside the
> driver by periodically reading the values stored in device's
> registers. There is an interrupt handler fsi_interrupt() (in fsi.c)
> called when codec receives some data, but I suppose I need to find
> something closer to the 'codec layer'. Or maybe I'm just thinking
> wrongly and there is much simpler way of doing this. Appreciate any
> advice.

The bigger question would be why you want to refresh the register cache
- normally this should not be required.  If you do need to do this it
would be better to trigger the refresh off whatever event causes the
register status in the CODEC to get out of sync.  If there are registers
which report status which does change dynamically normally they
shouldn't be cached at all but should instead be treated as volatile and
read back from the CODEC at all times.

  reply	other threads:[~2010-09-29 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-29  9:43 refreshing the reg cache in asoc driver lin_g
2010-09-29 17:52 ` Mark Brown [this message]
2010-10-01 10:08   ` Grzegorz Daniluk

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=20100929175215.GC19087@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=dp@opensource.wolfsonmicro.com \
    --cc=lin_g@o2.pl \
    /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.