irqchip/imx-intmux: Implement intmux runtime power management
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Mon, 27 Jul 2020 14:17:34 +0000 (22:17 +0800)
committerMarc Zyngier <maz@kernel.org>
Mon, 27 Jul 2020 07:55:05 +0000 (08:55 +0100)
commitbb403111e017a327737242eca40311921f833627
treecfb34ea100b0f12182c7be577cc2eca8e8510125
parentd1bd7e0ba533a2a6f313579ec9b504f6614c35c4
irqchip/imx-intmux: Implement intmux runtime power management

When the system is suspended, we can explicitly disable clock to save
power. To achieve this, we need save registers' state since it could be
lost after power off.

Implement power management which will:
- Turn the clock off after probing
- Disable clock and save registers' state on system suspend, as
  well as enable clock and restore registers' state on resume
- Rely on the Power Domain framework to shutdown the intmux
  power domain

Without CONFIG_PM, the clock is always on after probe stage.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
[maz: revamped commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200727141734.24890-2-qiangqing.zhang@nxp.com
drivers/irqchip/irq-imx-intmux.c