Lines Matching refs:s2mps11_clks
139 struct s2mps11_clk *s2mps11_clks; in s2mps11_clk_probe() local
145 s2mps11_clks = devm_kcalloc(&pdev->dev, S2MPS11_CLKS_NUM, in s2mps11_clk_probe()
146 sizeof(*s2mps11_clks), GFP_KERNEL); in s2mps11_clk_probe()
147 if (!s2mps11_clks) in s2mps11_clk_probe()
175 s2mps11_clks->clk_np = s2mps11_clk_parse_dt(pdev, s2mps11_clks_init); in s2mps11_clk_probe()
176 if (IS_ERR(s2mps11_clks->clk_np)) in s2mps11_clk_probe()
177 return PTR_ERR(s2mps11_clks->clk_np); in s2mps11_clk_probe()
182 s2mps11_clks[i].iodev = iodev; in s2mps11_clk_probe()
183 s2mps11_clks[i].hw.init = &s2mps11_clks_init[i]; in s2mps11_clk_probe()
184 s2mps11_clks[i].mask = 1 << i; in s2mps11_clk_probe()
185 s2mps11_clks[i].reg = s2mps11_reg; in s2mps11_clk_probe()
187 s2mps11_clks[i].clk = devm_clk_register(&pdev->dev, in s2mps11_clk_probe()
188 &s2mps11_clks[i].hw); in s2mps11_clk_probe()
189 if (IS_ERR(s2mps11_clks[i].clk)) { in s2mps11_clk_probe()
192 ret = PTR_ERR(s2mps11_clks[i].clk); in s2mps11_clk_probe()
196 s2mps11_clks[i].lookup = clkdev_hw_create(&s2mps11_clks[i].hw, in s2mps11_clk_probe()
198 if (!s2mps11_clks[i].lookup) { in s2mps11_clk_probe()
202 clk_data->hws[i] = &s2mps11_clks[i].hw; in s2mps11_clk_probe()
206 of_clk_add_hw_provider(s2mps11_clks->clk_np, of_clk_hw_onecell_get, in s2mps11_clk_probe()
209 platform_set_drvdata(pdev, s2mps11_clks); in s2mps11_clk_probe()
214 of_node_put(s2mps11_clks[0].clk_np); in s2mps11_clk_probe()
216 clkdev_drop(s2mps11_clks[i].lookup); in s2mps11_clk_probe()
223 struct s2mps11_clk *s2mps11_clks = platform_get_drvdata(pdev); in s2mps11_clk_remove() local
226 of_clk_del_provider(s2mps11_clks[0].clk_np); in s2mps11_clk_remove()
228 of_node_put(s2mps11_clks[0].clk_np); in s2mps11_clk_remove()
232 if (!s2mps11_clks[i].lookup) in s2mps11_clk_remove()
234 clkdev_drop(s2mps11_clks[i].lookup); in s2mps11_clk_remove()