summaryrefslogtreecommitdiff
path: root/include/linux/pm_clock.h
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@codeaurora.org>2015-04-23 11:33:09 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-05-13 00:55:37 +0300
commit75f504004ab866c8f84749303b0f70953724e259 (patch)
tree6da2563966637bab5da2a9377186aa9dd1afc015 /include/linux/pm_clock.h
parent030bbdbf4c833bc69f502eae58498bc5572db736 (diff)
downloadlinux-75f504004ab866c8f84749303b0f70953724e259.tar.xz
PM / clock_ops: Provide default runtime ops to users
Most users of PM clocks do the extact same things in the runtime suspend/resume callbacks. Provide them USE_PM_CLK_RUNTIME_OPS so as to avoid/remove boilerplate code. Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> Reviewed-by: Kevin Hilman <khilman@linaro.org> Acked-by: Santosh Shilimkar <ssantosh@kernel.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pm_clock.h')
-rw-r--r--include/linux/pm_clock.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/pm_clock.h b/include/linux/pm_clock.h
index 0b0039634410..25266c600021 100644
--- a/include/linux/pm_clock.h
+++ b/include/linux/pm_clock.h
@@ -20,6 +20,16 @@ struct pm_clk_notifier_block {
struct clk;
+#ifdef CONFIG_PM
+extern int pm_clk_runtime_suspend(struct device *dev);
+extern int pm_clk_runtime_resume(struct device *dev);
+#define USE_PM_CLK_RUNTIME_OPS \
+ .runtime_suspend = pm_clk_runtime_suspend, \
+ .runtime_resume = pm_clk_runtime_resume,
+#else
+#define USE_PM_CLK_RUNTIME_OPS
+#endif
+
#ifdef CONFIG_PM_CLK
static inline bool pm_clk_no_clocks(struct device *dev)
{