aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2007-02-22 03:38:52 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-02-22 09:53:32 -0500
commit0ebffe39f8ec8b5b126d9505852a396371014555 (patch)
tree391f32e9f7d995cca5b4d54b559291676ac618e9 /arch/arm
parent7f6e2d992d4cb2f537ece62d221e466df1fead1c (diff)
[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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-at91/gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index 7b87f3f101b7..44211a0af19a 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -210,7 +210,7 @@ int gpio_direction_input(unsigned pin)
210 210
211 if (!pio || !(__raw_readl(pio + PIO_PSR) & mask)) 211 if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
212 return -EINVAL; 212 return -EINVAL;
213 __raw_writel(mask, pio + PIO_OER); 213 __raw_writel(mask, pio + PIO_ODR);
214 return 0; 214 return 0;
215} 215}
216EXPORT_SYMBOL(gpio_direction_input); 216EXPORT_SYMBOL(gpio_direction_input);