• Geert Uytterhoeven's avatar
    gpio: rcar: Use wakeup_path i.s.o. explicit clock handling · 9ac79ba9
    Geert Uytterhoeven authored
    Since commit ab82fa7d ("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.
    Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    9ac79ba9
gpio-rcar.c 13.9 KB