]> Pileus Git - ~andy/linux/blobdiff - drivers/gpio/gpio-sa1100.c
drm/i915: gen7: Implement an L3 caching workaround.
[~andy/linux] / drivers / gpio / gpio-sa1100.c
index b6c1f6d80649a93145daef13d6fcfd042fe20e47..7eecf69362ee9d2b96d02fabc0a04ce1bdc8c3c6 100644 (file)
@@ -47,12 +47,18 @@ static int sa1100_direction_output(struct gpio_chip *chip, unsigned offset, int
        return 0;
 }
 
+static int sa1100_to_irq(struct gpio_chip *chip, unsigned offset)
+{
+       return offset < 11 ? (IRQ_GPIO0 + offset) : (IRQ_GPIO11 - 11 + offset);
+}
+
 static struct gpio_chip sa1100_gpio_chip = {
        .label                  = "gpio",
        .direction_input        = sa1100_direction_input,
        .direction_output       = sa1100_direction_output,
        .set                    = sa1100_gpio_set,
        .get                    = sa1100_gpio_get,
+       .to_irq                 = sa1100_to_irq,
        .base                   = 0,
        .ngpio                  = GPIO_MAX + 1,
 };