aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clk.h
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2020-10-21 18:38:46 +0200
committerStephen Boyd <sboyd@kernel.org>2020-11-14 12:58:30 -0800
commit6d30d50d037dfa092f9d5d1fffa348ab4abb7163 (patch)
tree64d445f870a7e22a1df663ca5f9ba55ac6995bd6 /include/linux/clk.h
parentclk: meson: g12: drop use of __clk_lookup() (diff)
downloadlinux-dev-6d30d50d037dfa092f9d5d1fffa348ab4abb7163.tar.xz
linux-dev-6d30d50d037dfa092f9d5d1fffa348ab4abb7163.zip
clk: add devm variant of clk_notifier_register
Add a memory managed variant of clk_notifier_register() to make life easier on clock consumers using notifiers Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20201021163847.595189-2-jbrunet@baylibre.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'include/linux/clk.h')
-rw-r--r--include/linux/clk.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 7fd6a1febcf4..f53afdf8198b 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -110,6 +110,16 @@ int clk_notifier_register(struct clk *clk, struct notifier_block *nb);
int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb);
/**
+ * devm_clk_notifier_register - register a managed rate-change notifier callback
+ * @dev: device for clock "consumer"
+ * @clk: clock whose rate we are interested in
+ * @nb: notifier block with callback function pointer
+ *
+ * Returns 0 on success, -EERROR otherwise
+ */
+int devm_clk_notifier_register(struct device *dev, struct clk *clk, struct notifier_block *nb);
+
+/**
* clk_get_accuracy - obtain the clock accuracy in ppb (parts per billion)
* for a clock source.
* @clk: clock source