aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2016-09-12 12:01:12 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-09-13 02:49:34 +0200
commitde0aa06d8b1c39df1071bfe169b3b97ca6bc01ac (patch)
tree01e47886fde0823831895c8d1a56d1c985b89d2a /include/linux/pm_domain.h
parentPM / Domains: Prepare for adding support to remove PM domains (diff)
downloadlinux-dev-de0aa06d8b1c39df1071bfe169b3b97ca6bc01ac.tar.xz
linux-dev-de0aa06d8b1c39df1071bfe169b3b97ca6bc01ac.zip
PM / Domains: Store the provider in the PM domain structure
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: Jon Hunter <jonathanh@nvidia.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r--include/linux/pm_domain.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index f103869db443..554f8915c691 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -51,6 +51,8 @@ struct generic_pm_domain {
struct mutex lock;
struct dev_power_governor *gov;
struct work_struct power_off_work;
+ struct fwnode_handle *provider; /* Identity of the domain provider */
+ bool has_provider;
const char *name;
atomic_t sd_count; /* Number of subdomains with power "on" */
enum gpd_status status; /* Current state of the domain */