Merge remote-tracking branch 'spi/topic/core' into spi-next
This commit is contained in:
@@ -697,10 +697,15 @@ static void spi_set_cs(struct spi_device *spi, bool enable)
|
||||
if (spi->mode & SPI_CS_HIGH)
|
||||
enable = !enable;
|
||||
|
||||
if (gpio_is_valid(spi->cs_gpio))
|
||||
if (gpio_is_valid(spi->cs_gpio)) {
|
||||
gpio_set_value(spi->cs_gpio, !enable);
|
||||
else if (spi->master->set_cs)
|
||||
/* Some SPI masters need both GPIO CS & slave_select */
|
||||
if ((spi->master->flags & SPI_MASTER_GPIO_SS) &&
|
||||
spi->master->set_cs)
|
||||
spi->master->set_cs(spi, !enable);
|
||||
} else if (spi->master->set_cs) {
|
||||
spi->master->set_cs(spi, !enable);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HAS_DMA
|
||||
|
Reference in New Issue
Block a user