gpio: rcar: set IRQ chip parent_device
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 8 Dec 2016 17:32:27 +0000 (18:32 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 28 Dec 2016 00:31:09 +0000 (01:31 +0100)
This enables Runtime PM handling for interrupts.

By setting the parent_device in struct irq_chip genirq will call the
pm_runtime_get/put APIs when an IRQ is requested/freed.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-rcar.c

index 2be48f5eba361af18817c8124dcc6637d1cff419..3b77c10c16f53125ebe17d91d6ebcf17556690c2 100644 (file)
@@ -460,6 +460,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
 
        irq_chip = &p->irq_chip;
        irq_chip->name = name;
+       irq_chip->parent_device = dev;
        irq_chip->irq_mask = gpio_rcar_irq_disable;
        irq_chip->irq_unmask = gpio_rcar_irq_enable;
        irq_chip->irq_set_type = gpio_rcar_irq_set_type;