提交 29c349d2 编写于 作者: B Bill Gatliff 提交者: Russell King

[ARM] 4422/1: Fix default value handling in gpio_direction_output (PXA)

The default value passed through to pxa_gpio_mode() is lost
due to a missing GPIO_DFLT_HIGH mask for nonzero values.  The enclosed
patch fixes this programming error.
Signed-off-by: NBill Gatliff <bgat@billgatliff.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 b6b27ae5
......@@ -45,7 +45,8 @@ static inline int gpio_direction_input(unsigned gpio)
static inline int gpio_direction_output(unsigned gpio, int value)
{
return pxa_gpio_mode(gpio | GPIO_OUT | (value ? 0 : GPIO_DFLT_LOW));
return pxa_gpio_mode(gpio | GPIO_OUT |
(value ? GPIO_DFLT_HIGH : GPIO_DFLT_LOW));
}
static inline int __gpio_get_value(unsigned gpio)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册