irqchip/renesas-irqc: Use wakeup_path i.s.o. explicit clock handling
Since commit 6f46aedb9c85873b ("irqchip: renesas-irqc: Add wake-up
support"), when an IRQ is used for wakeup, the INTC
block's module clock is manually kept running during system suspend, to
make sure the device stays active.
However, this explicit clock handling is merely a workaround for a
failure to properly communicate wakeup information to the device core.
Instead, set the device's power.wakeup_path field, to indicate this
device is part of the wakeup path. Depending on the PM Domain's
active_wakeup configuration, the genpd core code will keep the device
enabled (and the clock running) during system suspend when needed.
This allows for the removal of all explicit clock handling code from the
driver.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
- Revert to v1, as WAKEUP_PATH didn't make it,
- Use an atomic_t instead of a boolean flag, as the boolean tracked
only the status of the last configured GPIO, while multiple
interrupt pins on the same interrupt controller may be involved with
wake-up,
- Use new helper device_set_wakeup_path(),
- Drop checks for CONFIG_PM_SLEEP, as device_set_wakeup_path() is
always available, unlike dev_pm_info.wakeup_path,
- Mark irqc_suspend() __maybe_unused,
- Drop RFC state, now the dependencies are upstream.
v2 (sent by Ulf Hanson):
- Convert to use the WAKEUP_PATH driver PM flag (Ulf).
1 file changed