of/spi: Support specifying chip select as active high via device tree
The patch allows to specify that an SPI device needs an active high chip
select.
Signed-off-by: Wolfgang Ocker <weo@reccoware.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c
index b01eec0..bed0ed6 100644
--- a/drivers/of/of_spi.c
+++ b/drivers/of/of_spi.c
@@ -61,6 +61,8 @@
spi->mode |= SPI_CPHA;
if (of_find_property(nc, "spi-cpol", NULL))
spi->mode |= SPI_CPOL;
+ if (of_find_property(nc, "spi-cs-high", NULL))
+ spi->mode |= SPI_CS_HIGH;
/* Device speed */
prop = of_get_property(nc, "spi-max-frequency", &len);