aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-06-16 06:10:43 +0100
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:46 -0600
commit6220d9aa0f045b6fc98d72f3360cd87521a059eb (patch)
tree3a715dbd3b443a0365b3864ff9a98e3bff25fe7a
parent5c67745bf23e34b2a362b7f9c020ea86abeadb82 (diff)
downloadlinux-2.6.34-ux500-6220d9aa0f045b6fc98d72f3360cd87521a059eb.tar.gz
nomadik-gpio: implement to_irq
So that gpio_to_irq() works. ST-Ericsson ID: AP264622 Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/1798 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: I3f9ccc568a5c6b2c0230ad98214c6ee1d0eba5f7 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2627
-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 47559db9a47..12bacefc255 100644
--- a/arch/arm/plat-nomadik/gpio.c
+++ b/arch/arm/plat-nomadik/gpio.c
@@ -563,6 +563,14 @@ 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;
+}
+
#ifdef CONFIG_DEBUG_FS
#include <linux/seq_file.h>
@@ -659,6 +667,7 @@ static struct gpio_chip nmk_gpio_template = {
.get = nmk_gpio_get_input,
.direction_output = nmk_gpio_make_output,
.set = nmk_gpio_set_output,
+ .to_irq = nmk_gpio_to_irq,
.dbg_show = nmk_gpio_dbg_show,
.can_sleep = 0,
};