Message ID | 520265B2.3080403@c-s.fr (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- linux-3.8.13/drivers/spi/spi.c 2013-05-11 22:57:46.000000000 +0200 +++ linux/drivers/spi/spi.c 2013-08-06 18:15:34.000000000 +0200 @@ -870,6 +870,11 @@ if (of_find_property(nc, "spi-3wire", NULL)) spi->mode |= SPI_3WIRE; + /* Bits per word */ + prop = of_get_property(nc, "spi-bits", &len); + if (prop && len >= sizeof(*prop)) { + spi->bits_per_word = prop[0]; + } /* Device speed */ prop = of_get_property(nc, "spi-max-frequency", &len); if (!prop || len < sizeof(*prop)) {