• Maulik Shah's avatar
    PM: domains: Store the next hrtimer wakeup in genpd · 1498c503
    Maulik Shah authored
    The arch timer cannot wake up the Qualcomm Technologies, Inc. (QTI) SoCs
    from the deeper CPUidle states. To be able to wakeup from these deeper
    states, another always-on timer needs to be programmed through the so
    called CONTROL_TCS.
    
    As the RSC is part of CPU subsystem and the corresponding APSS RSC device
    is attached to the cluster PM domain (through genpd), it holds the
    responsibility to program the always-on timer, before entering any of these
    deeper CPUidle states.
    
    However, programming the timer requires information about the next hrtimer
    wakeup for the cluster PM domain, which is currently only known by genpd.
    Therefore, let's share this data through a new genpd helper function,
    dev_pm_genpd_get_next_hrtimer().
    Signed-off-by: default avatarMaulik Shah <quic_mkshah@quicinc.com>
    Cc: "Rafael J. Wysocki" <rafael@kernel.org>
    [Ulf: Reworked the code and updated the commit message]
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # SM8450
    Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
    Link: https://lore.kernel.org/r/20221018152837.619426-5-ulf.hansson@linaro.org
    1498c503
domain_governor.c 11.7 KB