diff options
| -rw-r--r-- | Documentation/devicetree/bindings/spi/spi-bus.txt | 2 | ||||
| -rw-r--r-- | drivers/spi/spi.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt index e5a4d1b4acfe..22d57404fdc3 100644 --- a/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt | |||
| @@ -55,6 +55,8 @@ contain the following properties. | |||
| 55 | chip select active high | 55 | chip select active high |
| 56 | - spi-3wire - (optional) Empty property indicating device requires | 56 | - spi-3wire - (optional) Empty property indicating device requires |
| 57 | 3-wire mode. | 57 | 3-wire mode. |
| 58 | - spi-lsb-first - (optional) Empty property indicating device requires | ||
| 59 | LSB first mode. | ||
| 58 | - spi-tx-bus-width - (optional) The bus width(number of data wires) that | 60 | - spi-tx-bus-width - (optional) The bus width(number of data wires) that |
| 59 | used for MOSI. Defaults to 1 if not present. | 61 | used for MOSI. Defaults to 1 if not present. |
| 60 | - spi-rx-bus-width - (optional) The bus width(number of data wires) that | 62 | - spi-rx-bus-width - (optional) The bus width(number of data wires) that |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index be13a35c6fec..d4f9670b51bc 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
| @@ -1255,6 +1255,8 @@ static void of_register_spi_devices(struct spi_master *master) | |||
| 1255 | spi->mode |= SPI_CS_HIGH; | 1255 | spi->mode |= SPI_CS_HIGH; |
| 1256 | if (of_find_property(nc, "spi-3wire", NULL)) | 1256 | if (of_find_property(nc, "spi-3wire", NULL)) |
| 1257 | spi->mode |= SPI_3WIRE; | 1257 | spi->mode |= SPI_3WIRE; |
| 1258 | if (of_find_property(nc, "spi-lsb-first", NULL)) | ||
| 1259 | spi->mode |= SPI_LSB_FIRST; | ||
| 1258 | 1260 | ||
| 1259 | /* Device DUAL/QUAD mode */ | 1261 | /* Device DUAL/QUAD mode */ |
| 1260 | if (!of_property_read_u32(nc, "spi-tx-bus-width", &value)) { | 1262 | if (!of_property_read_u32(nc, "spi-tx-bus-width", &value)) { |
