[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171114120207.xbee2cgsai4qka46@sirena.org.uk>
Date: Tue, 14 Nov 2017 12:02:07 +0000
From: Mark Brown <broonie@...nel.org>
To: Tim Harvey <tharvey@...eworks.com>
Cc: Jan Glauber <jan.glauber@...iumnetworks.com>,
linux-spi@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>
Subject: Re: MCP251x SPI CAN controller on Cavium ThunderX
On Mon, Nov 13, 2017 at 01:17:42PM -0800, Tim Harvey wrote:
> When a register is read from the mcp251x driver the
> octeon_spi_do_transfer() gets a spi_message with a single spi_xfer of
> len=3, a tx_buf, and an rx_buf which I believe is supposed to shift
> out 3 bytes out MOSI and shift in 3 bytes from MISO where the last
> byte shifted in would be the response.
No, that will simultaneously transmit and recieve three bytes. If you
want to transmit two bytes and then recieve one byte you need two xfers,
one with a len of 2 and a tx_buf, the other with a len of 1 and a rx_buf.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists