提交 0ebffe39 编写于 作者: A Andrew Victor 提交者: Russell King

[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: NAndrew Victor <andrew@sanpeople.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 7f6e2d99
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册