From f618ebfcbf9616a0fa9a78f5ecb69762f0fa3c59 Mon Sep 17 00:00:00 2001 From: Wolfgang Ocker Date: Wed, 15 Oct 2008 15:00:47 +0200 Subject: 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 Signed-off-by: Kumar Gala --- drivers/of/of_spi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/of') diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c index b01eec026f68..bed0ed6dcdc1 100644 --- a/drivers/of/of_spi.c +++ b/drivers/of/of_spi.c @@ -61,6 +61,8 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np) 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); -- cgit v1.2.3-59-g8ed1b