From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 2/2] ASoC: Use spi_write() for SPI writes
Date: Wed, 11 May 2011 10:16:04 -0700 [thread overview]
Message-ID: <4DCAC454.6090005@metafoo.de> (raw)
In-Reply-To: <1305114833-7553-2-git-send-email-broonie@opensource.wolfsonmicro.com>
On 05/11/2011 04:53 AM, Mark Brown wrote:
> do_spi_write() is just an open coded copy of do_spi_write() so we can
> delete it and just call spi_write() directly. Indeed, as a result of
> recent refactoring all the SPI write functions are just very long
> wrappers around spi_write() which don't add anything except for some
> pointless copies so we can just use spi_write() as the hw_write
> operation directly.
This won't work. spi_write returns 0 or an error, but the snd_soc_cache
framework expects the hw_write callback to return the number of bytes transferred.
We need to keep do_spi_write to get i2c_transfer like semantics for the return
value.
The two patches[1] I send last weekm which do basically the same as your patch,
but keep do_spi_write, work fine though.
- Lars
[1]
http://mailman.alsa-project.org/pipermail/alsa-devel/2011-May/039467.html
http://mailman.alsa-project.org/pipermail/alsa-devel/2011-May/039468.html
next prev parent reply other threads:[~2011-05-11 17:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 11:53 [PATCH 1/2] ASoC: Remove byte swap in 4x12 SPI write Mark Brown
2011-05-11 11:53 ` [PATCH 2/2] ASoC: Use spi_write() for SPI writes Mark Brown
2011-05-11 17:16 ` Lars-Peter Clausen [this message]
2011-05-11 17:24 ` Mark Brown
2011-05-11 13:37 ` [PATCH 1/2] ASoC: Remove byte swap in 4x12 SPI write Liam Girdwood
2011-05-11 17:35 ` Lars-Peter Clausen
2011-05-11 17:48 ` Mark Brown
2011-05-11 18:02 ` Lars-Peter Clausen
2011-05-11 18:05 ` 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=4DCAC454.6090005@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=patches@opensource.wolfsonmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).