[PATCH 2/4] spi: imx: correctly set GPIO chip selects on CSPI

Lucas Stach l.stach at pengutronix.de
Thu Feb 6 10:37:08 EST 2014


Do it the same way as on the new ECSPI.

Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
 drivers/spi/imx_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
index e43712e118b3..80029ca66056 100644
--- a/drivers/spi/imx_spi.c
+++ b/drivers/spi/imx_spi.c
@@ -189,7 +189,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;
 	}
 
@@ -277,7 +277,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;
 	}
 
-- 
1.8.5.3




More information about the barebox mailing list