[alsa-devel] [PATCH 2/2] ASoC: Use spi_write() for SPI writes

Mark Brown broonie at opensource.wolfsonmicro.com
Wed May 11 19:24:29 CEST 2011

On Wed, May 11, 2011 at 10:16:04AM -0700, Lars-Peter Clausen wrote:

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

Oh, fail.  We can still improve on the previous code by actually using
spi_write() rather than open coding it ourselves which is verbose, I'll
send a patch shortly.

More information about the Alsa-devel mailing list