aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-10-02 09:28:01 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-10-15 13:53:55 -0400
commit3e0cc7ee045fb53e8215fed7442455c0cee0ee93 (patch)
tree0fc2829d0678224f95cbece240f28a7b58231d1c /include/asm-arm
parent39cbd4896e39e2b93c33635a9abc1a4405827e14 (diff)
[ARM] pxa: Avoid pxa_gpio_mode() in gpio_direction_{in,out}put()
pxa_gpio_mode() is a universal call that fiddles with the GAFR (gpio alternate function register.) GAFR does not exist on PXA3 CPUs, but instead the alternate functions are controlled via the MFP support code. Platforms are expected to configure the MFP according to their needs in their platform support code rather than drivers. We extend this idea to the GAFR, and make the gpio_direction_*() functions purely operate on the GPIO level. This means platform support code is entirely responsible for configuring the GPIOs alternate functions on all PXA CPU types. 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.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h
index 9e99241f3edf..9dbc2dc794f7 100644
--- a/include/asm-arm/arch-pxa/gpio.h
+++ b/include/asm-arm/arch-pxa/gpio.h
@@ -38,16 +38,8 @@ static inline void gpio_free(unsigned gpio)
38 return; 38 return;
39} 39}
40 40
41static inline int gpio_direction_input(unsigned gpio) 41extern int gpio_direction_input(unsigned gpio);
42{ 42extern int gpio_direction_output(unsigned gpio, int value);
43 return pxa_gpio_mode(gpio | GPIO_IN);
44}
45
46static inline int gpio_direction_output(unsigned gpio, int value)
47{
48 return pxa_gpio_mode(gpio | GPIO_OUT |
49 (value ? GPIO_DFLT_HIGH : GPIO_DFLT_LOW));
50}
51 43
52static inline int __gpio_get_value(unsigned gpio) 44static inline int __gpio_get_value(unsigned gpio)
53{ 45{