diff options
author | Bill Gatliff <bgat@billgatliff.com> | 2007-05-31 11:17:16 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-06-02 16:31:48 -0400 |
commit | 29c349d22ccda5678a7dfb732093dbd3befcefa3 (patch) | |
tree | a221d1fe28f0e1c03f68a11cc010cce3f93b225b /include/asm-arm | |
parent | b6b27ae5e85fb193c08448157943b187958b8ca2 (diff) |
[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: Bill Gatliff <bgat@billgatliff.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-pxa/gpio.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h index aeba24347f8e..9e99241f3edf 100644 --- a/include/asm-arm/arch-pxa/gpio.h +++ b/include/asm-arm/arch-pxa/gpio.h | |||
@@ -45,7 +45,8 @@ static inline int gpio_direction_input(unsigned gpio) | |||
45 | 45 | ||
46 | static inline int gpio_direction_output(unsigned gpio, int value) | 46 | static inline int gpio_direction_output(unsigned gpio, int value) |
47 | { | 47 | { |
48 | return pxa_gpio_mode(gpio | GPIO_OUT | (value ? 0 : GPIO_DFLT_LOW)); | 48 | return pxa_gpio_mode(gpio | GPIO_OUT | |
49 | (value ? GPIO_DFLT_HIGH : GPIO_DFLT_LOW)); | ||
49 | } | 50 | } |
50 | 51 | ||
51 | static inline int __gpio_get_value(unsigned gpio) | 52 | static inline int __gpio_get_value(unsigned gpio) |