Files
kernel_xiaomi_sm8250/Documentation
Phil Edworthy f8f353585d clk: Add (devm_)clk_get_optional() functions
[ Upstream commit 60b8f0ddf1a927ef02141a6610fd52575134f821 ]

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>
Stable-dep-of: a6191a3d1811 ("gpio: aspeed: Use devm_clk api to manage clock source")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-08 16:19:18 +01:00
..
2018-09-26 18:11:23 +02:00
2023-06-21 15:39:57 +02:00
2023-06-21 15:39:57 +02:00
2021-05-22 10:59:50 +02:00
2018-07-07 17:27:13 +02:00
2018-05-08 09:16:41 -06:00