diff options
author | Jarkko Nikula <jarkko.nikula@nokia.com> | 2008-12-10 20:35:27 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-12-10 20:35:27 -0500 |
commit | 3ff164e15574191c69e8406794b0578c8d2a4e23 (patch) | |
tree | 66c338c6f8dc7893f7a0e44246191766499e83bf /arch/arm/plat-omap/include/mach/gpio.h | |
parent | 15f74b0335962e8554c91e52d588dc9f8ee7098d (diff) |
ARM: OMAP: make legacy gpio request/free calls superfluous
Clean up OMAP GPIO request/free functions
- Rename and declare static OMAP specific GPIO request/free functions
- Register them into gpiolib as chip-specific hooks
- Add omap_request_gpio/omap_free_gpio wrappers for existing code not
converted yet to use gpiolib
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
[ dbrownell@users.sourceforge.net: remove needless check_gpio() calls ]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/mach/gpio.h')
-rw-r--r-- | arch/arm/plat-omap/include/mach/gpio.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/mach/gpio.h b/arch/arm/plat-omap/include/mach/gpio.h index 552ad0c0ac4f..04e68e88f134 100644 --- a/arch/arm/plat-omap/include/mach/gpio.h +++ b/arch/arm/plat-omap/include/mach/gpio.h | |||
@@ -71,8 +71,6 @@ | |||
71 | IH_GPIO_BASE + (nr)) | 71 | IH_GPIO_BASE + (nr)) |
72 | 72 | ||
73 | extern int omap_gpio_init(void); /* Call from board init only */ | 73 | extern int omap_gpio_init(void); /* Call from board init only */ |
74 | extern int omap_request_gpio(int gpio); | ||
75 | extern void omap_free_gpio(int gpio); | ||
76 | extern void omap2_gpio_prepare_for_retention(void); | 74 | extern void omap2_gpio_prepare_for_retention(void); |
77 | extern void omap2_gpio_resume_after_retention(void); | 75 | extern void omap2_gpio_resume_after_retention(void); |
78 | extern void omap_set_gpio_debounce(int gpio, int enable); | 76 | extern void omap_set_gpio_debounce(int gpio, int enable); |
@@ -89,6 +87,16 @@ extern void omap_set_gpio_debounce_time(int gpio, int enable); | |||
89 | #include <linux/errno.h> | 87 | #include <linux/errno.h> |
90 | #include <asm-generic/gpio.h> | 88 | #include <asm-generic/gpio.h> |
91 | 89 | ||
90 | static inline int omap_request_gpio(int gpio) | ||
91 | { | ||
92 | return gpio_request(gpio, "FIXME"); | ||
93 | } | ||
94 | |||
95 | static inline void omap_free_gpio(int gpio) | ||
96 | { | ||
97 | gpio_free(gpio); | ||
98 | } | ||
99 | |||
92 | static inline int gpio_get_value(unsigned gpio) | 100 | static inline int gpio_get_value(unsigned gpio) |
93 | { | 101 | { |
94 | return __gpio_get_value(gpio); | 102 | return __gpio_get_value(gpio); |