These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / mips / rb532 / gpio.c
index 5aa3df8..650d5d3 100644 (file)
@@ -140,6 +140,11 @@ static int rb532_gpio_direction_output(struct gpio_chip *chip,
        return 0;
 }
 
+static int rb532_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
+{
+       return 8 + 4 * 32 + gpio;
+}
+
 static struct rb532_gpio_chip rb532_gpio_chip[] = {
        [0] = {
                .chip = {
@@ -148,6 +153,7 @@ static struct rb532_gpio_chip rb532_gpio_chip[] = {
                        .direction_output       = rb532_gpio_direction_output,
                        .get                    = rb532_gpio_get,
                        .set                    = rb532_gpio_set,
+                       .to_irq                 = rb532_gpio_to_irq,
                        .base                   = 0,
                        .ngpio                  = 32,
                },