]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
twl4030-gpio implements to_irq()
authorDavid Brownell <dbrownell@users.sourceforge.net>
Fri, 3 Oct 2008 16:04:47 +0000 (09:04 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 6 Oct 2008 06:33:42 +0000 (09:33 +0300)
Make twl4030 GPIO support the new gpio_to_irq() hook

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/gpio/twl4030-gpio.c

index a38a0235337247a044ab90e369f9a00f0d7f6aa3..f944b2db39228994be4fceb68a1929d6821e4b32 100644 (file)
@@ -653,6 +653,12 @@ static void twl_set(struct gpio_chip *chip, unsigned offset, int 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 = {
        .label                  = "twl4030",
        .owner                  = THIS_MODULE,
@@ -660,6 +666,7 @@ static struct gpio_chip twl_gpiochip = {
        .get                    = twl_get,
        .direction_output       = twl_direction_out,
        .set                    = twl_set,
+       .to_irq                 = twl_to_irq,
        .can_sleep              = 1,
 };