summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-nomadik/gpio.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-06-16 07:10:43 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-06-16 23:29:00 +0200
commit0d2aec9cd356254649fa2aa6bb5fb4d20cfded2c (patch)
tree57709a1e24ecfb9a94a46f607e7a8a1d6c1549a4 /arch/arm/plat-nomadik/gpio.c
parentARM: 6175/1: nomadik-gpio: implement set_wake (diff)
downloadlinux-0d2aec9cd356254649fa2aa6bb5fb4d20cfded2c.tar.xz
linux-0d2aec9cd356254649fa2aa6bb5fb4d20cfded2c.zip
ARM: 6176/1: nomadik-gpio: implement to_irq
So that gpio_to_irq() works. Acked-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-nomadik/gpio.c')
-rw-r--r--arch/arm/plat-nomadik/gpio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c
index 9cb717417ba0..1e0e9130e51e 100644
--- a/arch/arm/plat-nomadik/gpio.c
+++ b/arch/arm/plat-nomadik/gpio.c
@@ -515,12 +515,21 @@ static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset,
return 0;
}
+static int nmk_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
+{
+ struct nmk_gpio_chip *nmk_chip =
+ container_of(chip, struct nmk_gpio_chip, chip);
+
+ return NOMADIK_GPIO_TO_IRQ(nmk_chip->chip.base) + offset;
+}
+
/* This structure is replicated for each GPIO block allocated at probe time */
static struct gpio_chip nmk_gpio_template = {
.direction_input = nmk_gpio_make_input,
.get = nmk_gpio_get_input,
.direction_output = nmk_gpio_make_output,
.set = nmk_gpio_set_output,
+ .to_irq = nmk_gpio_to_irq,
.ngpio = NMK_GPIO_PER_CHIP,
.can_sleep = 0,
};