9
0
Fork 0

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:
Alexander Shiyan 2014-04-07 16:22:15 +04:00 committed by Sascha Hauer
parent feffac4782
commit 0530a2ea8f
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}