diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-02-24 21:20:27 +0100 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-02-24 21:20:27 +0100 |
| commit | 656f72bb2ef33cd832a0f8e80893cce09f3d43df (patch) | |
| tree | 9770613baf50a704d50d3221c057b37ed0fc8730 /include/linux | |
| parent | 74fb44863084275b952f21ec6a024af0e2e75cb8 (diff) | |
| parent | 85945c28b5a888043cb2b54f880d80d8915f21f5 (diff) | |
| download | blackbird-op-linux-656f72bb2ef33cd832a0f8e80893cce09f3d43df.tar.gz blackbird-op-linux-656f72bb2ef33cd832a0f8e80893cce09f3d43df.zip | |
Merge back earlier PM core material for v5.1.
Diffstat (limited to 'include/linux')
| -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) return !!dev->power.async_suspend; } +static inline bool device_pm_not_required(struct device *dev) +{ + return dev->power.no_pm; +} + +static inline void device_set_pm_not_required(struct device *dev) +{ + dev->power.no_pm = true; +} + static inline void dev_pm_syscore_device(struct device *dev, bool val) { #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 { bool is_suspended:1; /* Ditto */ bool is_noirq_suspended:1; bool is_late_suspended:1; + bool no_pm:1; bool early_init:1; /* Owned by the PM core */ bool direct_complete:1; /* Owned by the PM core */ u32 driver_flags; @@ -633,9 +634,9 @@ struct dev_pm_info { int runtime_error; int autosuspend_delay; u64 last_busy; - unsigned long active_jiffies; - unsigned long suspended_jiffies; - unsigned long accounting_timestamp; + u64 active_time; + u64 suspended_time; + u64 accounting_timestamp; #endif struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */ 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) return dev->power.irq_safe; } +extern u64 pm_runtime_suspended_time(struct device *dev); + #else /* !CONFIG_PM */ static inline bool queue_pm_work(struct work_struct *work) { return false; } |

