[RFC] gpio: rcar: Use wakeup_path i.s.o. explicit clock handling

Since commit ab82fa7da4dce5c7 ("gpio: rcar: Prevent module clock disable
when wake-up is enabled"), when a GPIO is used for wakeup, the GPIO
block's module clock (if exists) 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.

Note that the dev_pm_info.wakeup_path field exists only if
CONFIG_PM_SLEEP is enabled, hence the whole suspend infrastructure is
protected by #ifdef CONFIG_PM_SLEEP.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
To avoid regressions, this must not be applied before "soc: renesas:
rcar-sysc: Keep wakeup sources active during system suspend" has landed
upstream, hence the "RFC"!

This driver is used on Renesas R-Car and RZ/G1 platforms.
While the GPIO block on R-Car Gen1 doesn't have a controllable module
clock and is thus fine, the rcar-sysc driver doesn't keep wakeup sources
active during system suspend yet on R-Car Gen2 and Gen3, and on RZ/G1.

v3:
  - New.
1 file changed