diff options
author | Daniel Walker <dwalker@codeaurora.org> | 2010-12-13 17:35:07 -0500 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2010-12-15 17:13:16 -0500 |
commit | 940f2efc28564c478033b075bcfc8e7b694831e1 (patch) | |
tree | dd9248baa2703cef90c311236b0954f444d45157 | |
parent | 294b2dea83ba0a6d6034a7521bc62c317efab17b (diff) |
msm: trout: add gpio_to_irq
trout has gpiolib support and interrupt support, but was
missing the gpio_to_irq function. This adds that functions
which should allow proper translation.
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
-rw-r--r-- | arch/arm/mach-msm/board-trout-gpio.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/board-trout-gpio.c b/arch/arm/mach-msm/board-trout-gpio.c index c50f3afc3134..f8c09ef6666f 100644 --- a/arch/arm/mach-msm/board-trout-gpio.c +++ b/arch/arm/mach-msm/board-trout-gpio.c | |||
@@ -72,6 +72,13 @@ static int msm_gpiolib_direction_output(struct gpio_chip *chip, | |||
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | static int trout_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | ||
76 | { | ||
77 | struct msm_gpio_chip *msm_gpio = to_msm_gpio_chip(chip); | ||
78 | |||
79 | return TROUT_GPIO_TO_INT(offset + chip->base); | ||
80 | } | ||
81 | |||
75 | #define TROUT_GPIO_BANK(name, reg_num, base_gpio, shadow_val) \ | 82 | #define TROUT_GPIO_BANK(name, reg_num, base_gpio, shadow_val) \ |
76 | { \ | 83 | { \ |
77 | .chip = { \ | 84 | .chip = { \ |
@@ -80,6 +87,7 @@ static int msm_gpiolib_direction_output(struct gpio_chip *chip, | |||
80 | .direction_output = msm_gpiolib_direction_output, \ | 87 | .direction_output = msm_gpiolib_direction_output, \ |
81 | .get = msm_gpiolib_get, \ | 88 | .get = msm_gpiolib_get, \ |
82 | .set = msm_gpiolib_set, \ | 89 | .set = msm_gpiolib_set, \ |
90 | .to_irq = trout_gpio_to_irq, \ | ||
83 | .base = base_gpio, \ | 91 | .base = base_gpio, \ |
84 | .ngpio = 8, \ | 92 | .ngpio = 8, \ |
85 | }, \ | 93 | }, \ |