aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ks8695
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ks8695')
-rw-r--r--arch/arm/mach-ks8695/gpio.c5
-rw-r--r--arch/arm/mach-ks8695/include/mach/gpio.h6
2 files changed, 3 insertions, 8 deletions
diff --git a/arch/arm/mach-ks8695/gpio.c b/arch/arm/mach-ks8695/gpio.c
index 26d6346f38f1..55fbf7111a5b 100644
--- a/arch/arm/mach-ks8695/gpio.c
+++ b/arch/arm/mach-ks8695/gpio.c
@@ -197,15 +197,13 @@ static int ks8695_gpio_get_value(struct gpio_chip *gc, unsigned int pin)
197/* 197/*
198 * Map GPIO line to IRQ number. 198 * Map GPIO line to IRQ number.
199 */ 199 */
200int gpio_to_irq(unsigned int pin) 200static int ks8695_gpio_to_irq(struct gpio_chip *gc, unsigned int pin)
201{ 201{
202 if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */ 202 if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */
203 return -EINVAL; 203 return -EINVAL;
204 204
205 return gpio_irq[pin]; 205 return gpio_irq[pin];
206} 206}
207EXPORT_SYMBOL(gpio_to_irq);
208
209 207
210/* 208/*
211 * Map IRQ number to GPIO line. 209 * Map IRQ number to GPIO line.
@@ -227,6 +225,7 @@ static struct gpio_chip ks8695_gpio_chip = {
227 .direction_output = ks8695_gpio_direction_output, 225 .direction_output = ks8695_gpio_direction_output,
228 .get = ks8695_gpio_get_value, 226 .get = ks8695_gpio_get_value,
229 .set = ks8695_gpio_set_value, 227 .set = ks8695_gpio_set_value,
228 .to_irq = ks8695_gpio_to_irq,
230 .base = 0, 229 .base = 0,
231 .ngpio = 16, 230 .ngpio = 16,
232 .can_sleep = 0, 231 .can_sleep = 0,
diff --git a/arch/arm/mach-ks8695/include/mach/gpio.h b/arch/arm/mach-ks8695/include/mach/gpio.h
index 6379f2fe843d..86312d476bc6 100644
--- a/arch/arm/mach-ks8695/include/mach/gpio.h
+++ b/arch/arm/mach-ks8695/include/mach/gpio.h
@@ -36,11 +36,6 @@
36extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type); 36extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type);
37 37
38/* 38/*
39 * Map GPIO line to IRQ number.
40 */
41extern int gpio_to_irq(unsigned int pin);
42
43/*
44 * Map IRQ number to GPIO line. 39 * Map IRQ number to GPIO line.
45 */ 40 */
46extern int irq_to_gpio(unsigned int irq); 41extern int irq_to_gpio(unsigned int irq);
@@ -54,6 +49,7 @@ extern int irq_to_gpio(unsigned int irq);
54 */ 49 */
55#define gpio_get_value __gpio_get_value 50#define gpio_get_value __gpio_get_value
56#define gpio_set_value __gpio_set_value 51#define gpio_set_value __gpio_set_value
52#define gpio_to_irq __gpio_to_irq
57 53
58/* Register the GPIOs */ 54/* Register the GPIOs */
59extern void ks8695_register_gpios(void); 55extern void ks8695_register_gpios(void);