diff options
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r-- | include/linux/pm_domain.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index b1a22c65380b..7961b0dac437 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -11,6 +11,9 @@ #include <linux/device.h> +#define GPD_IN_SUSPEND 1 +#define GPD_POWER_OFF 2 + struct dev_power_governor { bool (*power_down_ok)(struct dev_pm_domain *domain); }; @@ -27,12 +30,21 @@ struct generic_pm_domain { unsigned int in_progress; /* Number of devices being suspended now */ unsigned int sd_count; /* Number of subdomains with power "on" */ bool power_is_off; /* Whether or not power has been removed */ + unsigned int device_count; /* Number of devices */ + unsigned int suspended_count; /* System suspend device counter */ + unsigned int prepared_count; /* Suspend counter of prepared devices */ + bool suspend_power_off; /* Power status before system suspend */ int (*power_off)(struct generic_pm_domain *domain); int (*power_on)(struct generic_pm_domain *domain); int (*start_device)(struct device *dev); int (*stop_device)(struct device *dev); }; +static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd) +{ + return container_of(pd, struct generic_pm_domain, domain); +} + struct dev_list_entry { struct list_head node; struct device *dev; |