aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_runtime.h
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2018-12-21 11:33:54 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-01-15 22:47:24 +0100
commit8a62ffe2753a845272f4f2100b5fca0b6053ff6f (patch)
tree31e2c8eaa9d740462dbe65845269b5db7dc9c027 /include/linux/pm_runtime.h
parentLinux 5.0-rc2 (diff)
downloadlinux-dev-8a62ffe2753a845272f4f2100b5fca0b6053ff6f.tar.xz
linux-dev-8a62ffe2753a845272f4f2100b5fca0b6053ff6f.zip
PM-runtime: Add new interface to get accounted time
Some drivers (like i915/drm) needs to get the accounted suspended time. pm_runtime_suspended_time() will return the suspended accounted time in ns unit. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pm_runtime.h')
-rw-r--r--include/linux/pm_runtime.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 54af4eef169f..a370006921c0 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; }