mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-24 00:17:08 +00:00
ramips: 6.1: spi: fix patch by replacing cs_gpio with cs_gpiod
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] - f48dc6b966
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
[split commit and rewrite commit message]
Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
parent
31c4fc7414
commit
10452ea407
@ -339,8 +339,8 @@ Acked-by: John Crispin <blogic@openwrt.org>
|
|||||||
+ if (spi->mode & SPI_CS_HIGH)
|
+ if (spi->mode & SPI_CS_HIGH)
|
||||||
+ enable = !enable;
|
+ enable = !enable;
|
||||||
+
|
+
|
||||||
+ if (spi->cs_gpio >= 0)
|
+ if (spi->cs_gpiod)
|
||||||
+ gpio_set_value(spi->cs_gpio, !enable);
|
+ gpiod_set_value(spi->cs_gpiod, !enable);
|
||||||
+ else if (spi->master->set_cs)
|
+ else if (spi->master->set_cs)
|
||||||
+ spi->master->set_cs(spi, !enable);
|
+ spi->master->set_cs(spi, !enable);
|
||||||
+}
|
+}
|
||||||
|
Loading…
Reference in New Issue
Block a user