Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: Add support for specifying 3-wire mode via device tree

This patch allows to specify that a SPI device is connected in 3-wire mode via
device tree.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

authored by

Lars-Peter Clausen and committed by
Grant Likely
c20151df 5323f498

+4
+2
Documentation/devicetree/bindings/spi/spi-bus.txt
··· 53 53 shifted clock phase (CPHA) mode 54 54 - spi-cs-high - (optional) Empty property indicating device requires 55 55 chip select active high 56 + - spi-3wire - (optional) Empty property indicating device requires 57 + 3-wire mode. 56 58 57 59 If a gpio chipselect is used for the SPI slave the gpio number will be passed 58 60 via the cs_gpio
+2
drivers/spi/spi.c
··· 861 861 spi->mode |= SPI_CPOL; 862 862 if (of_find_property(nc, "spi-cs-high", NULL)) 863 863 spi->mode |= SPI_CS_HIGH; 864 + if (of_find_property(nc, "spi-3wire", NULL)) 865 + spi->mode |= SPI_3WIRE; 864 866 865 867 /* Device speed */ 866 868 prop = of_get_property(nc, "spi-max-frequency", &len);