irqchip: renesas-intc-irqpin: Add minimal runtime PM support
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 12 Sep 2014 13:15:18 +0000 (15:15 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 04:18:04 +0000 (13:18 +0900)
commit4258a25c038257c7621e033f9b7fd9bbdedccb85
tree02fce311c81c198e4bcc2b4c1e16997365a42ca6
parentc2e7403c4fc02529362836c75885ee14494cdb91
irqchip: renesas-intc-irqpin: Add minimal runtime PM support

This is just enough to let pm_clk_*() enable the functional clock, and
manage it for suspend/resume, if present.
Before, it was assumed enabled by the bootloader or reset state.

To prevent the clock from being disabled while the module is needed for
wake-up, implement irq_chip.irq_set_wake(), which increments/decrements
the clock's enable_count when needed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lkml.kernel.org/r/1410527720-18061-3-git-send-email-geert+renesas@glider.be
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
(cherry picked from commit 705bc96c2c15313c0677607f6e81800f4d2b4534)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/irqchip/irq-renesas-intc-irqpin.c