Message ID | 20190209233825.2883-1-linus.walleij@linaro.org |
---|---|
State | New |
Headers | show |
Series | spi: use gpio[d]_set_value_cansleep for setting chipselect GPIO | expand |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 2f7176f07591..93986f879b09 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -786,9 +786,10 @@ static void spi_set_cs(struct spi_device *spi, bool enable) */ if (!(spi->mode & SPI_NO_CS)) { if (spi->cs_gpiod) - gpiod_set_value(spi->cs_gpiod, !enable); + gpiod_set_value_cansleep(spi->cs_gpiod, + !enable); else - gpio_set_value(spi->cs_gpio, !enable); + gpio_set_value_cansleep(spi->cs_gpio, !enable); } /* Some SPI masters need both GPIO CS & slave_select */ if ((spi->controller->flags & SPI_MASTER_GPIO_SS) &&