aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/bfin_gpio.c
diff options
context:
space:
mode:
authorJoachim Eastwood <joachim.eastwood@jotron.com>2010-02-10 06:31:41 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:52 -0500
commit7f4f69f991146fa976cbc914a50285b2afc0ad93 (patch)
tree3cbcc6cdf3e433e2be68278b51a22aa7be9f9773 /arch/blackfin/kernel/bfin_gpio.c
parentf8e6dbffa7a6cb3da3bcaf1fde3039896e1ac764 (diff)
Blackfin: GPIO: implement to_irq handler
This makes it possible to support IRQs coming from off-chip GPIO controllers. Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/kernel/bfin_gpio.c')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 0dd9cf913503..6dcb344001f0 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -1319,6 +1319,11 @@ void bfin_gpiolib_gpio_free(struct gpio_chip *chip, unsigned gpio)
1319 return bfin_gpio_free(gpio); 1319 return bfin_gpio_free(gpio);
1320} 1320}
1321 1321
1322int bfin_gpiolib_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
1323{
1324 return gpio + GPIO_IRQ_BASE;
1325}
1326
1322static struct gpio_chip bfin_chip = { 1327static struct gpio_chip bfin_chip = {
1323 .label = "BFIN-GPIO", 1328 .label = "BFIN-GPIO",
1324 .direction_input = bfin_gpiolib_direction_input, 1329 .direction_input = bfin_gpiolib_direction_input,
@@ -1327,6 +1332,7 @@ static struct gpio_chip bfin_chip = {
1327 .set = bfin_gpiolib_set_value, 1332 .set = bfin_gpiolib_set_value,
1328 .request = bfin_gpiolib_gpio_request, 1333 .request = bfin_gpiolib_gpio_request,
1329 .free = bfin_gpiolib_gpio_free, 1334 .free = bfin_gpiolib_gpio_free,
1335 .to_irq = bfin_gpiolib_gpio_to_irq,
1330 .base = 0, 1336 .base = 0,
1331 .ngpio = MAX_BLACKFIN_GPIOS, 1337 .ngpio = MAX_BLACKFIN_GPIOS,
1332}; 1338};