Lines Matching +full:assigned +full:- +full:clock +full:- +full:rates
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()
43 if (PTR_ERR(pclk) != -EPROBE_DEFER) in __set_clk_parents()
44 pr_warn("clk: couldn't get parent clock %d for %pOF\n", in __set_clk_parents()
49 rc = of_parse_phandle_with_args(node, "assigned-clocks", in __set_clk_parents()
50 "#clock-cells", index, &clkspec); in __set_clk_parents()
61 if (PTR_ERR(clk) != -EPROBE_DEFER) in __set_clk_parents()
62 pr_warn("clk: couldn't get assigned clock %d for %pOF\n", in __set_clk_parents()
88 of_property_for_each_u32(node, "assigned-clock-rates", rate) { in __set_clk_rates()
90 rc = of_parse_phandle_with_args(node, "assigned-clocks", in __set_clk_rates()
91 "#clock-cells", index, &clkspec); in __set_clk_rates()
94 if (rc == -ENOENT) in __set_clk_rates()
107 if (PTR_ERR(clk) != -EPROBE_DEFER) in __set_clk_rates()
108 pr_warn("clk: couldn't get clock %d for %pOF\n", in __set_clk_rates()
126 * of_clk_set_defaults() - parse and set assigned clocks configuration
127 * @node: device node to apply clock settings for
130 * This function parses 'assigned-{clocks/clock-parents/clock-rates}' properties
131 * and sets any specified clock parents and rates. The @clk_supplier argument
132 * should be set to true if @node may be also a clock supplier of any clock
133 * listed in its 'assigned-clocks' or 'assigned-clock-parents' properties.