Upstream commit
f48dc6b96649 ("spi: Retire legacy GPIO handling") [0]
removed support using GPIOs as chip select. Fix it by replacing cs_gpio
with cs_gpiod.
[0] - https://github.com/torvalds/linux/commit/
f48dc6b9664963107e500aecfc2f4df27dc5afb6
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
[split commit and rewrite commit message]
Signed-off-by: Nick Hainke <vincent@systemli.org>
+ if (spi->mode & SPI_CS_HIGH)
+ enable = !enable;
+
-+ if (spi->cs_gpio >= 0)
-+ gpio_set_value(spi->cs_gpio, !enable);
++ if (spi->cs_gpiod)
++ gpiod_set_value(spi->cs_gpiod, !enable);
+ else if (spi->master->set_cs)
+ spi->master->set_cs(spi, !enable);
+}