Lines Matching refs:clk_data

24 	struct clk_onecell_data *clk_data;  in mtk_alloc_clk_data()  local
26 clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL); in mtk_alloc_clk_data()
27 if (!clk_data) in mtk_alloc_clk_data()
30 clk_data->clks = kcalloc(clk_num, sizeof(*clk_data->clks), GFP_KERNEL); in mtk_alloc_clk_data()
31 if (!clk_data->clks) in mtk_alloc_clk_data()
34 clk_data->clk_num = clk_num; in mtk_alloc_clk_data()
37 clk_data->clks[i] = ERR_PTR(-ENOENT); in mtk_alloc_clk_data()
39 return clk_data; in mtk_alloc_clk_data()
41 kfree(clk_data); in mtk_alloc_clk_data()
47 int num, struct clk_onecell_data *clk_data) in mtk_clk_register_fixed_clks() argument
55 if (clk_data && !IS_ERR_OR_NULL(clk_data->clks[rc->id])) in mtk_clk_register_fixed_clks()
67 if (clk_data) in mtk_clk_register_fixed_clks()
68 clk_data->clks[rc->id] = clk; in mtk_clk_register_fixed_clks()
73 int num, struct clk_onecell_data *clk_data) in mtk_clk_register_factors() argument
81 if (clk_data && !IS_ERR_OR_NULL(clk_data->clks[ff->id])) in mtk_clk_register_factors()
93 if (clk_data) in mtk_clk_register_factors()
94 clk_data->clks[ff->id] = clk; in mtk_clk_register_factors()
100 int num, struct clk_onecell_data *clk_data, in mtk_clk_register_gates_with_dev() argument
107 if (!clk_data) in mtk_clk_register_gates_with_dev()
120 if (!IS_ERR_OR_NULL(clk_data->clks[gate->id])) in mtk_clk_register_gates_with_dev()
136 clk_data->clks[gate->id] = clk; in mtk_clk_register_gates_with_dev()
144 int num, struct clk_onecell_data *clk_data) in mtk_clk_register_gates() argument
147 clks, num, clk_data, NULL); in mtk_clk_register_gates()
239 struct clk_onecell_data *clk_data) in mtk_clk_register_composites() argument
247 if (clk_data && !IS_ERR_OR_NULL(clk_data->clks[mc->id])) in mtk_clk_register_composites()
258 if (clk_data) in mtk_clk_register_composites()
259 clk_data->clks[mc->id] = clk; in mtk_clk_register_composites()
265 struct clk_onecell_data *clk_data) in mtk_clk_register_dividers() argument
273 if (clk_data && !IS_ERR_OR_NULL(clk_data->clks[mcd->id])) in mtk_clk_register_dividers()
286 if (clk_data) in mtk_clk_register_dividers()
287 clk_data->clks[mcd->id] = clk; in mtk_clk_register_dividers()
294 struct clk_onecell_data *clk_data; in mtk_clk_simple_probe() local
302 clk_data = mtk_alloc_clk_data(mcd->num_clks); in mtk_clk_simple_probe()
303 if (!clk_data) in mtk_clk_simple_probe()
306 r = mtk_clk_register_gates(node, mcd->clks, mcd->num_clks, clk_data); in mtk_clk_simple_probe()
310 return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data); in mtk_clk_simple_probe()