From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Wed, 8 Aug 2018 10:56:53 +0200 Subject: [U-Boot] [PATCH 1/4 v2] spi: spi-mem: Use 2 SPI messages instead of a single full-duplex one In-Reply-To: <20180807152802.0a3d1332@bbrezillon> References: <20180807121655.22346-1-sr@denx.de> <20180807152802.0a3d1332@bbrezillon> Message-ID: <20180808105653.1cca3bc0@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Stefan, Jagan, Boris Brezillon wrote on Tue, 7 Aug 2018 15:28:02 +0200: > On Tue, 7 Aug 2018 14:16:52 +0200 > Stefan Roese wrote: >=20 > > Some SPI controller do not support full-duplex SPI transfers. This patch > > changes the SPI transfer into 2 separate transfers - or 1, if no data is > > to transmitted. > >=20 > > With this change, no buffers need to be allocated anymore. We use the > > TX and RX buffers that are passed to spi_mem_exec_op() directly. > >=20 > > Signed-off-by: Stefan Roese > > Suggested-by: Boris Brezillon > > Cc: Miquel Raynal > > Cc: Boris Brezillon > > Cc: Jagan Teki =20 >=20 > Looks good overall, just a few comments (that you might chose to ignore > if you disagree). >=20 > Reviewed-by: Boris Brezillon >=20 Sorry for being a bit late on the discussion, but while I do agree with the change, I'm not sure about its implementation : I think SPI controllers are supposed to be abstracted by the SPI layer. Addressing the controller's limitations in the SPI-mem layer would not be appropriate. Would it be possible to adapt spi_xfer() to handle such case?=20 Thanks, Miqu=C3=A8l