aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ks8695/gpio.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-12-13 15:44:13 -0500
committerBen Dooks <ben-linux@fluff.org>2008-12-14 06:34:47 -0500
commit7ef71320eba8933275be10bfa44e083bec95b3f1 (patch)
tree3f588c2f24204ecedcce1b3814cd5c3b130e9c4b /arch/arm/mach-ks8695/gpio.c
parent72880ad866c21badace4d8026c1e58f2fde087fb (diff)
[ARM] KS8695: Add GPIO to IRQ mapping function
Use the GPIOlib .to_irq call to map KS8695 GPIOs to the relevant IRQ line. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-ks8695/gpio.c')
-rw-r--r--arch/arm/mach-ks8695/gpio.c5
1 files changed, 2 insertions, 3 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,