• Ulf Hansson's avatar
    PM: domains: Add support for PM domain on/off notifiers for genpd · d4f81383
    Ulf Hansson authored
    A device may have specific HW constraints that must be obeyed to, before
    its corresponding PM domain (genpd) can be powered off - and vice verse at
    power on. These constraints can't be managed through the regular runtime PM
    based deployment for a device, because the access pattern for it, isn't
    always request based. In other words, using the runtime PM callbacks to
    deal with the constraints doesn't work for these cases.
    
    For these reasons, let's instead add a PM domain power on/off notification
    mechanism to genpd. To add/remove a notifier for a device, the device must
    already have been attached to the genpd, which also means that it needs to
    be a part of the PM domain topology.
    
    To add/remove a notifier, let's introduce two genpd specific functions:
     - dev_pm_genpd_add|remove_notifier()
    
    Note that, to further clarify when genpd power on/off notifiers may be
    used, one can compare with the existing CPU_CLUSTER_PM_ENTER|EXIT
    notifiers. In the long run, the genpd power on/off notifiers should be able
    to replace them, but that requires additional genpd based platform support
    for the current users.
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Tested-by: default avatarLina Iyer <ilina@codeaurora.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    d4f81383
domain.c 80.1 KB