From a238281eb33afc986d61568fdeb589953245346d Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Thu, 6 Dec 2012 16:55:33 +0100 Subject: [PATCH] --- yaml --- r: 343651 b: refs/heads/master c: c20151dff8a6d503c0d0cc4387c33a618cdabcb7 h: refs/heads/master i: 343649: 53a0da993e92b679b6af9996c1418b9a115dd68b 343647: 03c054a2efcf19fd50585064563eb870736d78e5 v: v3 --- [refs] | 2 +- trunk/Documentation/devicetree/bindings/spi/spi-bus.txt | 2 ++ trunk/drivers/spi/spi.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e573fbeb4e9e..0f200b7a56cc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5323f49853ba5f37d9975fe6bd13546c2ec790c8 +refs/heads/master: c20151dff8a6d503c0d0cc4387c33a618cdabcb7 diff --git a/trunk/Documentation/devicetree/bindings/spi/spi-bus.txt b/trunk/Documentation/devicetree/bindings/spi/spi-bus.txt index 77a8b0d39b54..296015e3c632 100644 --- a/trunk/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/trunk/Documentation/devicetree/bindings/spi/spi-bus.txt @@ -53,6 +53,8 @@ contain the following properties. shifted clock phase (CPHA) mode - spi-cs-high - (optional) Empty property indicating device requires chip select active high +- spi-3wire - (optional) Empty property indicating device requires + 3-wire mode. If a gpio chipselect is used for the SPI slave the gpio number will be passed via the cs_gpio diff --git a/trunk/drivers/spi/spi.c b/trunk/drivers/spi/spi.c index b370d292d19c..2ca5f079ff01 100644 --- a/trunk/drivers/spi/spi.c +++ b/trunk/drivers/spi/spi.c @@ -861,6 +861,8 @@ static void of_register_spi_devices(struct spi_master *master) spi->mode |= SPI_CPOL; if (of_find_property(nc, "spi-cs-high", NULL)) spi->mode |= SPI_CS_HIGH; + if (of_find_property(nc, "spi-3wire", NULL)) + spi->mode |= SPI_3WIRE; /* Device speed */ prop = of_get_property(nc, "spi-max-frequency", &len);