]> git.baikalelectronics.ru Git - kernel.git/commit
spi: gpio: No MISO does not imply no RX
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 9 Sep 2018 22:28:05 +0000 (00:28 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 10 Sep 2018 11:29:58 +0000 (12:29 +0100)
commit4d25341bd14e545e6477414e633678d41ccd3c12
tree1b196610d4318c4b0f544beed19a0c9566f8df5d
parent29ce429b3937c97f107619e5a29a01e2c21cf9e8
spi: gpio: No MISO does not imply no RX

There is a logical problem in spi-gpio with host just
assigning a MOSI line and no MISO: this is interpreted
as the host cannot do RX and the host is flagged with
SPI_MASTER_NO_RX.

This is wrong: since GPIO lines can switch direction,
in 3WIRE operation the host will simply reverse the
direction of the GPIO line and start reading from it,
there is even code for doing this in the driver, but
it went unnoticed because it was tested by using a
master with 4 wires but a device using just 3 wires.

Remove the offending flag.

Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-gpio.c