Lines Matching +full:permit +full:-
1 // SPDX-License-Identifier: GPL-2.0-only
19 #include <linux/clk-provider.h>
33 * Then we take the most specific entry - with the following
50 if (p->dev_id) { in clk_find()
51 if (!dev_id || strcmp(p->dev_id, dev_id)) in clk_find()
55 if (p->con_id) { in clk_find()
56 if (!con_id || strcmp(p->con_id, con_id)) in clk_find()
75 struct clk_hw *hw = ERR_PTR(-ENOENT); in clk_find_hw()
80 hw = cl->clk_hw; in clk_find_hw()
105 if (dev && dev->of_node) { in clk_get()
106 hw = of_clk_get_hw(dev->of_node, 0, con_id); in clk_get()
107 if (!IS_ERR(hw) || PTR_ERR(hw) == -EPROBE_DEFER) in clk_get()
124 list_add_tail(&cl->node, &clocks); in __clkdev_add()
130 if (!cl->clk_hw) in clkdev_add()
131 cl->clk_hw = __clk_get_hw(cl->clk); in clkdev_add()
139 while (num--) { in clkdev_add_table()
140 cl->clk_hw = __clk_get_hw(cl->clk); in clkdev_add_table()
141 list_add_tail(&cl->node, &clocks); in clkdev_add_table()
173 cla->cl.clk_hw = hw; in vclkdev_alloc()
175 res = strscpy(cla->con_id, con_id, sizeof(cla->con_id)); in vclkdev_alloc()
177 max_size = sizeof(cla->con_id); in vclkdev_alloc()
181 cla->cl.con_id = cla->con_id; in vclkdev_alloc()
185 res = vsnprintf(cla->dev_id, sizeof(cla->dev_id), dev_fmt, ap); in vclkdev_alloc()
186 if (res >= sizeof(cla->dev_id)) { in vclkdev_alloc()
187 max_size = sizeof(cla->dev_id); in vclkdev_alloc()
191 cla->cl.dev_id = cla->dev_id; in vclkdev_alloc()
196 return &cla->cl; in vclkdev_alloc()
202 vaf.fmt = "null-device"; in vclkdev_alloc()
212 strscpy(cla->con_id, "bad", sizeof(cla->con_id)); in vclkdev_alloc()
213 strscpy(cla->dev_id, "bad", sizeof(cla->dev_id)); in vclkdev_alloc()
215 return &cla->cl; in vclkdev_alloc()
232 * clkdev_create - allocate and add a clkdev lookup structure
255 * clkdev_hw_create - allocate and add a clkdev lookup structure
290 return l ? 0 : -ENODEV; in clk_add_alias()
295 * clkdev_drop - remove a clock dynamically allocated
300 list_del(&cl->node); in clkdev_drop()
334 return *cl ? 0 : -ENOMEM; in do_clk_register_clkdev()
338 * clk_register_clkdev - register one clock lookup for a struct clk
348 * those. This is to permit this function to be called immediately
365 * clk_hw_register_clkdev - register one clock lookup for a struct clk_hw
375 * those. This is to permit this function to be called immediately
393 * devm_clk_hw_register_clkdev - managed clk lookup registration for clk_hw
404 * those. This is to permit this function to be called immediately