Commit 48a6370c authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

twl4030-gpio implements to_irq()

Make twl4030 GPIO support the new gpio_to_irq() hook
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 6884daf9
...@@ -653,6 +653,12 @@ static void twl_set(struct gpio_chip *chip, unsigned offset, int value) ...@@ -653,6 +653,12 @@ static void twl_set(struct gpio_chip *chip, unsigned offset, int value)
twl4030_set_gpio_dataout(offset, value); twl4030_set_gpio_dataout(offset, value);
} }
static int twl_to_irq(struct gpio_chip *chip, unsigned offset)
{
/* NOTE: assumes IRQs are set up ... */
return twl4030_gpio_irq_base + offset;
}
static struct gpio_chip twl_gpiochip = { static struct gpio_chip twl_gpiochip = {
.label = "twl4030", .label = "twl4030",
.owner = THIS_MODULE, .owner = THIS_MODULE,
...@@ -660,6 +666,7 @@ static struct gpio_chip twl_gpiochip = { ...@@ -660,6 +666,7 @@ static struct gpio_chip twl_gpiochip = {
.get = twl_get, .get = twl_get,
.direction_output = twl_direction_out, .direction_output = twl_direction_out,
.set = twl_set, .set = twl_set,
.to_irq = twl_to_irq,
.can_sleep = 1, .can_sleep = 1,
}; };
......
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