diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/device.h | 10 | ||||
| -rw-r--r-- | include/linux/pm.h | 7 | ||||
| -rw-r--r-- | include/linux/pm_runtime.h | 2 |
3 files changed, 16 insertions, 3 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 6cb4640b6160..53028636fe39 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -1165,6 +1165,16 @@ static inline bool device_async_suspend_enabled(struct device *dev) | |||
| 1165 | return !!dev->power.async_suspend; | 1165 | return !!dev->power.async_suspend; |
| 1166 | } | 1166 | } |
| 1167 | 1167 | ||
| 1168 | static inline bool device_pm_not_required(struct device *dev) | ||
| 1169 | { | ||
| 1170 | return dev->power.no_pm; | ||
| 1171 | } | ||
| 1172 | |||
| 1173 | static inline void device_set_pm_not_required(struct device *dev) | ||
| 1174 | { | ||
| 1175 | dev->power.no_pm = true; | ||
| 1176 | } | ||
| 1177 | |||
| 1168 | static inline void dev_pm_syscore_device(struct device *dev, bool val) | 1178 | static inline void dev_pm_syscore_device(struct device *dev, bool val) |
| 1169 | { | 1179 | { |
| 1170 | #ifdef CONFIG_PM_SLEEP | 1180 | #ifdef CONFIG_PM_SLEEP |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 0bd9de116826..06f7ed893928 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -592,6 +592,7 @@ struct dev_pm_info { | |||
| 592 | bool is_suspended:1; /* Ditto */ | 592 | bool is_suspended:1; /* Ditto */ |
| 593 | bool is_noirq_suspended:1; | 593 | bool is_noirq_suspended:1; |
| 594 | bool is_late_suspended:1; | 594 | bool is_late_suspended:1; |
| 595 | bool no_pm:1; | ||
| 595 | bool early_init:1; /* Owned by the PM core */ | 596 | bool early_init:1; /* Owned by the PM core */ |
| 596 | bool direct_complete:1; /* Owned by the PM core */ | 597 | bool direct_complete:1; /* Owned by the PM core */ |
| 597 | u32 driver_flags; | 598 | u32 driver_flags; |
| @@ -633,9 +634,9 @@ struct dev_pm_info { | |||
| 633 | int runtime_error; | 634 | int runtime_error; |
| 634 | int autosuspend_delay; | 635 | int autosuspend_delay; |
| 635 | u64 last_busy; | 636 | u64 last_busy; |
| 636 | unsigned long active_jiffies; | 637 | u64 active_time; |
| 637 | unsigned long suspended_jiffies; | 638 | u64 suspended_time; |
| 638 | unsigned long accounting_timestamp; | 639 | u64 accounting_timestamp; |
| 639 | #endif | 640 | #endif |
| 640 | struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */ | 641 | struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */ |
| 641 | void (*set_latency_tolerance)(struct device *, s32); | 642 | void (*set_latency_tolerance)(struct device *, s32); |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index fed5be706bc9..9dc6eebf62d2 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -113,6 +113,8 @@ static inline bool pm_runtime_is_irq_safe(struct device *dev) | |||
| 113 | return dev->power.irq_safe; | 113 | return dev->power.irq_safe; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | extern u64 pm_runtime_suspended_time(struct device *dev); | ||
| 117 | |||
| 116 | #else /* !CONFIG_PM */ | 118 | #else /* !CONFIG_PM */ |
| 117 | 119 | ||
| 118 | static inline bool queue_pm_work(struct work_struct *work) { return false; } | 120 | static inline bool queue_pm_work(struct work_struct *work) { return false; } |
