Lines Matching +full:assigned +full:- +full:clocks +full:- +full:parents
1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/clk-provider.h>
9 #include <linux/clk/clk-conf.h>
21 num_parents = of_count_phandle_with_args(node, "assigned-clock-parents", in __set_clk_parents()
22 "#clock-cells"); in __set_clk_parents()
23 if (num_parents == -EINVAL) in __set_clk_parents()
24 pr_err("clk: invalid value of clock-parents property at %pOF\n", in __set_clk_parents()
28 rc = of_parse_phandle_with_args(node, "assigned-clock-parents", in __set_clk_parents()
29 "#clock-cells", index, &clkspec); in __set_clk_parents()
32 if (rc == -ENOENT) in __set_clk_parents()
44 if (PTR_ERR(pclk) != -EPROBE_DEFER) in __set_clk_parents()
50 rc = of_parse_phandle_with_args(node, "assigned-clocks", in __set_clk_parents()
51 "#clock-cells", index, &clkspec); in __set_clk_parents()
62 if (PTR_ERR(clk) != -EPROBE_DEFER) in __set_clk_parents()
63 pr_warn("clk: couldn't get assigned clock %d for %pOF\n", in __set_clk_parents()
90 count = of_property_count_u32_elems(node, "assigned-clock-rates"); in __set_clk_rates()
91 count_64 = of_property_count_u64_elems(node, "assigned-clock-rates-u64"); in __set_clk_rates()
96 return -ENOMEM; in __set_clk_rates()
99 "assigned-clock-rates-u64", in __set_clk_rates()
104 return -ENOMEM; in __set_clk_rates()
106 rc = of_property_read_u32_array(node, "assigned-clock-rates", in __set_clk_rates()
124 rc = of_parse_phandle_with_args(node, "assigned-clocks", in __set_clk_rates()
125 "#clock-cells", index, &clkspec); in __set_clk_rates()
128 if (rc == -ENOENT) in __set_clk_rates()
141 if (PTR_ERR(clk) != -EPROBE_DEFER) in __set_clk_rates()
159 * of_clk_set_defaults() - parse and set assigned clocks configuration
161 * @clk_supplier: true if clocks supplied by @node should also be considered
163 * This function parses 'assigned-{clocks/clock-parents/clock-rates}' properties
164 * and sets any specified clock parents and rates. The @clk_supplier argument
166 * listed in its 'assigned-clocks' or 'assigned-clock-parents' properties.
168 * determines the @node is also a supplier of any of the clocks.