• Jon Hunter's avatar
    PM / Domains: Store the provider in the PM domain structure · de0aa06d
    Jon Hunter authored
    It is possible that a device has more than one provider of PM domains
    and to support the removal of a PM domain by provider, it is necessary
    to store a reference to the provider in the PM domain structure.
    Therefore, store a reference to the firmware node handle in the PM
    domain structure and populate it when providers (only device-tree based
    providers are currently supported by PM domains) are registered.
    
    Please note that when removing PM domains, it is necessary to verify
    that the PM domain provider has been removed from the list of providers
    before the PM domain can be removed. To do this add another member to
    the PM domain structure that indicates if the provider is present and
    set this member accordingly when providers are added and removed.
    
    Initialise the 'provider' and 'has_provider' members of the
    generic_pm_domain structure when a PM domains is added by calling
    pm_genpd_init().
    Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
    Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    de0aa06d
domain.c 49.4 KB