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()
40 if (PTR_ERR(pclk) != -EPROBE_DEFER) in __set_clk_parents()
41 pr_warn("clk: couldn't get parent clock %d for %pOF\n", 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()
102 pr_warn("clk: couldn't get clock %d for %pOF\n", in __set_clk_rates()
120 * of_clk_set_defaults() - parse and set assigned clocks configuration
121 * @node: device node to apply clock settings for
124 * This function parses 'assigned-{clocks/clock-parents/clock-rates}' properties
125 * and sets any specified clock parents and rates. The @clk_supplier argument
126 * should be set to true if @node may be also a clock supplier of any clock
127 * listed in its 'assigned-clocks' or 'assigned-clock-parents' properties.