gpio: rcar: Add Runtime PM handling for interrupts
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 18 Feb 2016 16:06:30 +0000 (17:06 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 25 Feb 2016 09:06:01 +0000 (10:06 +0100)
commit29821c2c611f1f4e4013fe68686375a2b84281c7
treefb9b69e8f93743dd48730a29dd982860fe94b9c5
parent40c8eabac43db862810367edb2fe9ec7f69e814e
gpio: rcar: Add Runtime PM handling for interrupts

The R-Car GPIO driver handles Runtime PM for requested GPIOs only.

When using a GPIO purely as an interrupt source, no Runtime PM handling
is done, and the GPIO module's clock may not be enabled.

To fix this:
  - Add .irq_request_resources() and .irq_release_resources() callbacks
    to handle Runtime PM when an interrupt is requested,
  - Add irq_bus_lock() and sync_unlock() callbacks to handle Runtime PM
    when e.g. disabling/enabling an interrupt, or configuring the
    interrupt type.

Fixes: d5c3d84657db57bd "net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS"
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-rcar.c