Lines Matching +full:clock +full:- +full:error +full:- +full:detect

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()
166 cla->cl.clk_hw = hw; in vclkdev_alloc()
168 strscpy(cla->con_id, con_id, sizeof(cla->con_id)); in vclkdev_alloc()
169 cla->cl.con_id = cla->con_id; in vclkdev_alloc()
173 vscnprintf(cla->dev_id, sizeof(cla->dev_id), dev_fmt, ap); in vclkdev_alloc()
174 cla->cl.dev_id = cla->dev_id; in vclkdev_alloc()
177 return &cla->cl; in vclkdev_alloc()
194 * clkdev_create - allocate and add a clkdev lookup structure
217 * clkdev_hw_create - allocate and add a clkdev lookup structure
252 return l ? 0 : -ENODEV; in clk_add_alias()
257 * clkdev_drop - remove a clock dynamically allocated
262 list_del(&cl->node); in clkdev_drop()
296 return *cl ? 0 : -ENOMEM; in do_clk_register_clkdev()
300 * clk_register_clkdev - register one clock lookup for a struct clk
308 * To make things easier for mass registration, we detect error clks
309 * from a previous clk_register() call, and return the error code for
327 * clk_hw_register_clkdev - register one clock lookup for a struct clk_hw
335 * To make things easier for mass registration, we detect error clk_hws
336 * from a previous clk_hw_register_*() call, and return the error code for
355 * devm_clk_hw_register_clkdev - managed clk lookup registration for clk_hw
364 * To make things easier for mass registration, we detect error clk_hws
365 * from a previous clk_hw_register_*() call, and return the error code for