Commit 940f2efc authored by Daniel Walker's avatar Daniel Walker Committed by David Brown

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: default avatarDaniel Walker <dwalker@codeaurora.org>
Signed-off-by: default avatarDavid Brown <davidb@codeaurora.org>
parent 294b2dea
...@@ -72,6 +72,13 @@ static int msm_gpiolib_direction_output(struct gpio_chip *chip, ...@@ -72,6 +72,13 @@ static int msm_gpiolib_direction_output(struct gpio_chip *chip,
return 0; return 0;
} }
static int trout_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
{
struct msm_gpio_chip *msm_gpio = to_msm_gpio_chip(chip);
return TROUT_GPIO_TO_INT(offset + chip->base);
}
#define TROUT_GPIO_BANK(name, reg_num, base_gpio, shadow_val) \ #define TROUT_GPIO_BANK(name, reg_num, base_gpio, shadow_val) \
{ \ { \
.chip = { \ .chip = { \
...@@ -80,6 +87,7 @@ static int msm_gpiolib_direction_output(struct gpio_chip *chip, ...@@ -80,6 +87,7 @@ static int msm_gpiolib_direction_output(struct gpio_chip *chip,
.direction_output = msm_gpiolib_direction_output, \ .direction_output = msm_gpiolib_direction_output, \
.get = msm_gpiolib_get, \ .get = msm_gpiolib_get, \
.set = msm_gpiolib_set, \ .set = msm_gpiolib_set, \
.to_irq = trout_gpio_to_irq, \
.base = base_gpio, \ .base = base_gpio, \
.ngpio = 8, \ .ngpio = 8, \
}, \ }, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment