[PATCH 2/7] imx/gpio: make gpio_get_value actually work
Sascha Hauer
s.hauer at pengutronix.de
Fri Apr 23 03:49:29 EDT 2010
On Fri, Apr 23, 2010 at 08:22:40AM +0200, Wolfram Sang wrote:
> From: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
>
> The value read at the pin is provided by Sample Status Register, not the
> Data Register.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
ok, applied to -next
Sascha
> ---
> arch/arm/mach-imx/gpio.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-imx/gpio.c b/arch/arm/mach-imx/gpio.c
> index 6157bd1..c6a59a6 100644
> --- a/arch/arm/mach-imx/gpio.c
> +++ b/arch/arm/mach-imx/gpio.c
> @@ -121,7 +121,7 @@ int gpio_get_value(unsigned gpio)
> if (!base)
> return -EINVAL;
>
> - val = readl(base + GPIO_DR);
> + val = readl(base + GPIO_PSR);
>
> return val & (1 << shift) ? 1 : 0;
> }
> --
> 1.7.0
>
>
> _______________________________________________
> barebox mailing list
> barebox at 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 |
More information about the barebox
mailing list