[ARM] 4232/1: AT91: Generic GPIO bug

The new gpio_direction_input() and gpio_direction_output() functions
were both enabling output mode.  When configuring a GPIO for input mode,
you need to program the ODR (Output Disable Register).

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Andrew Victor 2007-02-22 09:38:52 +01:00 committed by Russell King
parent 7f6e2d992d
commit 0ebffe39f8
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ int gpio_direction_input(unsigned pin)
if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
return -EINVAL;
__raw_writel(mask, pio + PIO_OER);
__raw_writel(mask, pio + PIO_ODR);
return 0;
}
EXPORT_SYMBOL(gpio_direction_input);