]> git.sur5r.net Git - u-boot/commitdiff
spi: Get spi-3wire from dts
authorJagan Teki <jteki@openedev.com>
Thu, 3 Dec 2015 16:49:05 +0000 (22:19 +0530)
committerJagan Teki <jteki@openedev.com>
Fri, 11 Dec 2015 16:42:23 +0000 (22:12 +0530)
spi-3wire is used when SI/SO signals shared so get
the same from dts node and assign to mode on slave
plat->mode.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jteki@openedev.com>
drivers/spi/spi-uclass.c

index 3c7d64ae63227d47702795fe9d5be722726a11ad..e0f6b25f30a6b6b6f814415faabc7968a12a00cb 100644 (file)
@@ -378,6 +378,8 @@ int spi_slave_ofdata_to_platdata(const void *blob, int node,
                mode |= SPI_CPHA;
        if (fdtdec_get_bool(blob, node, "spi-cs-high"))
                mode |= SPI_CS_HIGH;
+       if (fdtdec_get_bool(blob, node, "spi-3wire"))
+               mode |= SPI_3WIRE;
        if (fdtdec_get_bool(blob, node, "spi-half-duplex"))
                mode |= SPI_PREAMBLE;
        plat->mode = mode;