spi: i.MX: Fix direction for CS GPIOs
Direction for CS GPIOs (for some targets) is undefined. This patch fixes this issue. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
feffac4782
commit
0530a2ea8f
|
@ -167,7 +167,7 @@ static void cspi_0_0_chipselect(struct spi_device *spi, int is_active)
|
|||
|
||||
if (!is_active) {
|
||||
if (gpio >= 0)
|
||||
gpio_set_value(gpio, !cs);
|
||||
gpio_direction_output(gpio, !cs);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ static void cspi_0_7_chipselect(struct spi_device *spi, int is_active)
|
|||
|
||||
if (!is_active) {
|
||||
if (gpio >= 0)
|
||||
gpio_set_value(gpio, !cs);
|
||||
gpio_direction_output(gpio, !cs);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue