[PATCH] clk: fix of clk set defaults when dev is a clk provider

Sascha Hauer s.hauer at pengutronix.de
Thu Jun 17 07:17:23 PDT 2021


When a newly registered device is a clk provider itself we must call
of_clk_set_defaults() explicitly when the clk provider is registered.
With this we can also honour the assigned-clock-* properties for the
clocks just registered.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/clk/clk.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ba726c342c..6e27cc0c8f 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -593,6 +593,8 @@ int of_clk_add_provider(struct device_node *np,
 	list_add(&cp->link, &of_clk_providers);
 	pr_debug("Added clock from %s\n", np ? np->full_name : "<none>");
 
+	of_clk_set_defaults(np, true);
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(of_clk_add_provider);
-- 
2.29.2




More information about the barebox mailing list