mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
8e677e7f0a
commit
6d30d50d03
2 changed files with 46 additions and 0 deletions
|
@ -109,6 +109,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue