diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-04-07 16:22:15 +0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-04-08 08:20:27 +0200 |
commit | 0530a2ea8f1f372d4e977f8bac3916259347cccd (patch) | |
tree | d3f35cbab461b32413795c56d667dd2d0fedf1e4 /drivers | |
parent | feffac47826ee709e659e219138efd8c55791063 (diff) | |
download | barebox-0530a2ea8f1f372d4e977f8bac3916259347cccd.tar.gz barebox-0530a2ea8f1f372d4e977f8bac3916259347cccd.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/imx_spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c index 6675729314..45461bd954 100644 --- a/drivers/spi/imx_spi.c +++ b/drivers/spi/imx_spi.c @@ -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; } |