summaryrefslogtreecommitdiffstats
path: root/Documentation/driver-model/devres.txt
diff options
context:
space:
mode:
authorPhil Edworthy2018-12-03 12:13:09 +0100
committerStephen Boyd2019-02-06 19:33:10 +0100
commit60b8f0ddf1a927ef02141a6610fd52575134f821 (patch)
tree60ea4fd636e291ff196d984885d2690571c9021b /Documentation/driver-model/devres.txt
parentclk: Add comment about __of_clk_get_by_name() error values (diff)
downloadkernel-qcow2-linux-60b8f0ddf1a927ef02141a6610fd52575134f821.tar.gz
kernel-qcow2-linux-60b8f0ddf1a927ef02141a6610fd52575134f821.tar.xz
kernel-qcow2-linux-60b8f0ddf1a927ef02141a6610fd52575134f821.zip
clk: Add (devm_)clk_get_optional() functions
This adds clk_get_optional() and devm_clk_get_optional() functions to get optional clocks. They behave the same as (devm_)clk_get() except where there is no clock producer. In this case, instead of returning -ENOENT, the function returns NULL. This makes error checking simpler and allows clk_prepare_enable, etc to be called on the returned reference without additional checks. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Russell King <linux@armlinux.org.uk> [sboyd@kernel.org: Document in devres.txt] Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'Documentation/driver-model/devres.txt')
-rw-r--r--Documentation/driver-model/devres.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index b277cafce71e..83f38c0439cd 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -242,6 +242,7 @@ certainly invest a bit more effort into libata core layer).
CLOCK
devm_clk_get()
+ devm_clk_get_optional()
devm_clk_put()
devm_clk_hw_register()
devm_of_clk_add_hw_provider()