Commit d35f2dc9 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

spi: pxa2xx: Don't touch CS pin until we have a transfer pending

GPIO descriptors, when being requested, may configure pin at the same
time. In case of SPI chip select we shouldn't do any assumptions of the
state of pin since we don't know yet what chip is connected there and if
it uses high or low active state. So, leave the state of pin as is until
transfer will start.

Fixes: 99f499cd ("spi: pxa2xx: Add support for GPIO descriptor chip selects")
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarMika Westeberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6ac5a435
...@@ -1769,8 +1769,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) ...@@ -1769,8 +1769,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
for (i = 0; i < master->num_chipselect; i++) { for (i = 0; i < master->num_chipselect; i++) {
struct gpio_desc *gpiod; struct gpio_desc *gpiod;
gpiod = devm_gpiod_get_index(dev, "cs", i, gpiod = devm_gpiod_get_index(dev, "cs", i, GPIOD_ASIS);
GPIOD_OUT_HIGH);
if (IS_ERR(gpiod)) { if (IS_ERR(gpiod)) {
/* Means use native chip select */ /* Means use native chip select */
if (PTR_ERR(gpiod) == -ENOENT) if (PTR_ERR(gpiod) == -ENOENT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment