Lines Matching +full:assigned +full:- +full:clocks

1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/clk-provider.h>
9 #include <linux/clk/clk-conf.h>
20 num_parents = of_count_phandle_with_args(node, "assigned-clock-parents", in __set_clk_parents()
21 "#clock-cells"); in __set_clk_parents()
22 if (num_parents == -EINVAL) in __set_clk_parents()
23 pr_err("clk: invalid value of clock-parents property at %pOF\n", in __set_clk_parents()
27 rc = of_parse_phandle_with_args(node, "assigned-clock-parents", in __set_clk_parents()
28 "#clock-cells", index, &clkspec); in __set_clk_parents()
31 if (rc == -ENOENT) in __set_clk_parents()
40 if (PTR_ERR(pclk) != -EPROBE_DEFER) in __set_clk_parents()
46 rc = of_parse_phandle_with_args(node, "assigned-clocks", in __set_clk_parents()
47 "#clock-cells", index, &clkspec); in __set_clk_parents()
56 if (PTR_ERR(clk) != -EPROBE_DEFER) in __set_clk_parents()
57 pr_warn("clk: couldn't get assigned clock %d for %pOF\n", in __set_clk_parents()
85 of_property_for_each_u32(node, "assigned-clock-rates", prop, cur, rate) { in __set_clk_rates()
87 rc = of_parse_phandle_with_args(node, "assigned-clocks", in __set_clk_rates()
88 "#clock-cells", index, &clkspec); in __set_clk_rates()
91 if (rc == -ENOENT) in __set_clk_rates()
101 if (PTR_ERR(clk) != -EPROBE_DEFER) in __set_clk_rates()
120 * of_clk_set_defaults() - parse and set assigned clocks configuration
122 * @clk_supplier: true if clocks supplied by @node should also be considered
124 * This function parses 'assigned-{clocks/clock-parents/clock-rates}' properties
127 * listed in its 'assigned-clocks' or 'assigned-clock-parents' properties.
129 * determines the @node is also a supplier of any of the clocks.