aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ks8695/include
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@simtec.co.uk>2008-12-13 15:44:12 -0500
committerBen Dooks <ben-linux@fluff.org>2008-12-14 06:34:47 -0500
commit72880ad866c21badace4d8026c1e58f2fde087fb (patch)
tree83a2a5a7f46ef890426ee83c931c14ac325724be /arch/arm/mach-ks8695/include
parentfbd627100bc4a9ebce8c7617df499ee5db763780 (diff)
[ARM] KS8695: Fixup the KS8695 GPIO to be GPIOLIB
This patch is as small a change as possible to the KS8695 GPIO layer to use GPIOLIB to allow the generic GPIO expanders and the like to be compiled. As a side-effect, we also remove __init_or_module from several functions which could be called by drivers such as i2c-gpio which could plausibly be compiled into a non-modular kernel. Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk> Signed-off-by: Vincent Sanders <vince@simtec.co.uk> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-ks8695/include')
-rw-r--r--arch/arm/mach-ks8695/include/mach/gpio.h45
1 files changed, 12 insertions, 33 deletions
diff --git a/arch/arm/mach-ks8695/include/mach/gpio.h b/arch/arm/mach-ks8695/include/mach/gpio.h
index d4af5c335f16..6379f2fe843d 100644
--- a/arch/arm/mach-ks8695/include/mach/gpio.h
+++ b/arch/arm/mach-ks8695/include/mach/gpio.h
@@ -30,53 +30,32 @@
30#define KS8695_GPIO_14 14 30#define KS8695_GPIO_14 14
31#define KS8695_GPIO_15 15 31#define KS8695_GPIO_15 15
32 32
33
34/* 33/*
35 * Configure GPIO pin as external interrupt source. 34 * Configure GPIO pin as external interrupt source.
36 */ 35 */
37int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type); 36extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type);
38
39/*
40 * Configure the GPIO line as an input.
41 */
42int __init_or_module gpio_direction_input(unsigned int pin);
43
44/*
45 * Configure the GPIO line as an output, with default state.
46 */
47int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state);
48
49/*
50 * Set the state of an output GPIO line.
51 */
52void gpio_set_value(unsigned int pin, unsigned int state);
53
54/*
55 * Read the state of a GPIO line.
56 */
57int gpio_get_value(unsigned int pin);
58 37
59/* 38/*
60 * Map GPIO line to IRQ number. 39 * Map GPIO line to IRQ number.
61 */ 40 */
62int gpio_to_irq(unsigned int pin); 41extern int gpio_to_irq(unsigned int pin);
63 42
64/* 43/*
65 * Map IRQ number to GPIO line. 44 * Map IRQ number to GPIO line.
66 */ 45 */
67int irq_to_gpio(unsigned int irq); 46extern int irq_to_gpio(unsigned int irq);
68
69 47
70#include <asm-generic/gpio.h> 48#include <asm-generic/gpio.h>
71 49
72static inline int gpio_request(unsigned int pin, const char *label) 50/* If it turns out that we need to optimise GPIO access for the
73{ 51 * Micrel's GPIOs, then these can be changed to check their argument
74 return 0; 52 * directly as static inlines. However for now it's probably not
75} 53 * worthwhile.
54 */
55#define gpio_get_value __gpio_get_value
56#define gpio_set_value __gpio_set_value
76 57
77static inline void gpio_free(unsigned int pin) 58/* Register the GPIOs */
78{ 59extern void ks8695_register_gpios(void);
79 might_sleep();
80}
81 60
82#endif 61#endif