* [PATCH] spi: i.MX: Fix direction for CS GPIOs
@ 2014-04-07 12:22 Alexander Shiyan
2014-04-08 6:20 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2014-04-07 12:22 UTC (permalink / raw)
To: barebox
Direction for CS GPIOs (for some targets) is undefined.
This patch fixes this issue.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
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 6675729..45461bd 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;
}
--
1.8.3.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: i.MX: Fix direction for CS GPIOs
2014-04-07 12:22 [PATCH] spi: i.MX: Fix direction for CS GPIOs Alexander Shiyan
@ 2014-04-08 6:20 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2014-04-08 6:20 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Mon, Apr 07, 2014 at 04:22:15PM +0400, Alexander Shiyan wrote:
> Direction for CS GPIOs (for some targets) is undefined.
> This patch fixes this issue.
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Applied, thanks
Sascha
> ---
> 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 6675729..45461bd 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;
> }
>
> --
> 1.8.3.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-08 6:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07 12:22 [PATCH] spi: i.MX: Fix direction for CS GPIOs Alexander Shiyan
2014-04-08 6:20 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox