]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/gpio/twl4030-gpio.c
twl4030-gpio implements to_irq()
[linux-2.6-omap-h63xx.git] / 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,
 };