diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2012-02-09 16:21:45 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-10 10:28:56 -0400 |
commit | 05644147064acabb8587c4cbd690047494f7b3a1 (patch) | |
tree | aa56a2853bce14e640a52cdf88f81084e80580d8 /drivers/spi/spi-gpio.c | |
parent | 619ac8d3e582ccd806f24dcfc369c4c250ca9814 (diff) |
spi/gpio: start with CS non-active
The chip select line was configured as output with the initial value
being active explicitly. It was later deasserted during
spi_bitbang_setup() without any clock activity in between. So it makes
no sense to activate the device at all and the chip select line can
better start non-active.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi/spi-gpio.c')
-rw-r--r-- | drivers/spi/spi-gpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index 0094c645ff0d..0b56cfc71fab 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c | |||
@@ -235,7 +235,8 @@ static int spi_gpio_setup(struct spi_device *spi) | |||
235 | status = gpio_request(cs, dev_name(&spi->dev)); | 235 | status = gpio_request(cs, dev_name(&spi->dev)); |
236 | if (status) | 236 | if (status) |
237 | return status; | 237 | return status; |
238 | status = gpio_direction_output(cs, spi->mode & SPI_CS_HIGH); | 238 | status = gpio_direction_output(cs, |
239 | !(spi->mode & SPI_CS_HIGH)); | ||
239 | } | 240 | } |
240 | } | 241 | } |
241 | if (!status) | 242 | if (!status) |