From: Mark Brown <broonie@kernel.org>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: si476x: Remove custom register I/O implementation
Date: Fri, 27 Sep 2013 18:02:32 +0100 [thread overview]
Message-ID: <20130927170232.GL19304@sirena.org.uk> (raw)
In-Reply-To: <CAHQ1cqHwqYpdrUnYfXOsVXcYHRPGWzkTNv5SJKACUdXN58=wew@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 985 bytes --]
On Fri, Sep 27, 2013 at 08:53:58AM -0700, Andrey Smirnov wrote:
> > OK, so if it's purely about send_command() then why is the locking not
> > being done in that function? Surely the most obvious and robust place
> > to protect the function is within the function itself?
> Not having send_command acquire any locks allows me to have variable
> levels of granularity of locking, for example in the worker thread
> that fetches RDS data from the chip it allows me to get exclusive
> access to the chip for the duration of the FIFO draining. Also any
> band switch for that chip, like AM to FM, etc. require chip to be
> power cycled which translates to multiple calls to send_command as
> well, I think having those performed atomically simplifies the driver
> as well.
Right, so it's not just protecting send_command() but is instead
protecting higher level things. In that case shouldn't the locking be
performed further up in this driver too rather than on each register
write?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2013-09-27 17:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 18:34 [PATCH] ASoC: si476x: Remove custom register I/O implementation Mark Brown
2013-09-26 19:33 ` Andrey Smirnov
2013-09-26 19:43 ` Mark Brown
2013-09-26 19:58 ` Andrey Smirnov
2013-09-26 20:58 ` Mark Brown
2013-09-26 22:48 ` Andrey Smirnov
2013-09-27 10:07 ` Mark Brown
2013-09-27 15:53 ` Andrey Smirnov
2013-09-27 17:02 ` Mark Brown [this message]
2013-09-27 19:28 ` Andrey Smirnov
2013-09-27 19:48 ` Mark Brown
2013-09-28 4:37 ` Andrey Smirnov
2013-09-28 11:53 ` 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=20130927170232.GL19304@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=andrew.smirnov@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox