#define PMSG_AUTO_RESUME ((struct pm_message) \
{ .event = PM_EVENT_AUTO_RESUME, })
+#define PMSG_IS_AUTO(msg) (((msg).event & PM_EVENT_AUTO) != 0)
+
/**
* Device run-time power management status.
*
struct wakeup_source;
+ struct pm_domain_data {
+ struct list_head list_node;
+ struct device *dev;
+ };
+
+ struct pm_subsys_data {
+ spinlock_t lock;
+ unsigned int refcount;
+ #ifdef CONFIG_PM_CLK
+ struct list_head clock_list;
+ #endif
+ #ifdef CONFIG_PM_GENERIC_DOMAINS
+ struct pm_domain_data *domain_data;
+ #endif
+ };
+
struct dev_pm_info {
pm_message_t power_state;
unsigned int can_wakeup:1;
unsigned long suspended_jiffies;
unsigned long accounting_timestamp;
#endif
- void *subsys_data; /* Owned by the subsystem. */
+ struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */
};
extern void update_pm_runtime_accounting(struct device *dev);
+ extern int dev_pm_get_subsys_data(struct device *dev);
+ extern int dev_pm_put_subsys_data(struct device *dev);
/*
* Power domains provide callbacks that are executed during system suspend,