Skip to content

Commit d35f2dc

Browse files
andy-shevbroonie
authored andcommitted
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: 99f499c ("spi: pxa2xx: Add support for GPIO descriptor chip selects") Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Mika Westeberg <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 6ac5a43 commit d35f2dc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/spi/spi-pxa2xx.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,8 +1769,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
17691769
for (i = 0; i < master->num_chipselect; i++) {
17701770
struct gpio_desc *gpiod;
17711771

1772-
gpiod = devm_gpiod_get_index(dev, "cs", i,
1773-
GPIOD_OUT_HIGH);
1772+
gpiod = devm_gpiod_get_index(dev, "cs", i, GPIOD_ASIS);
17741773
if (IS_ERR(gpiod)) {
17751774
/* Means use native chip select */
17761775
if (PTR_ERR(gpiod) == -ENOENT)

0 commit comments

Comments
 (0)