Lines Matching +full:clk +full:- +full:provider
1 // SPDX-License-Identifier: GPL-2.0
12 #include <linux/clk-provider.h>
20 struct clk_hw *clk; in fixed_mmio_clk_setup() local
21 const char *clk_name = node->name; in fixed_mmio_clk_setup()
29 return ERR_PTR(-EIO); in fixed_mmio_clk_setup()
34 of_property_read_string(node, "clock-output-names", &clk_name); in fixed_mmio_clk_setup()
36 clk = clk_hw_register_fixed_rate(NULL, clk_name, NULL, 0, freq); in fixed_mmio_clk_setup()
37 if (IS_ERR(clk)) { in fixed_mmio_clk_setup()
39 return clk; in fixed_mmio_clk_setup()
42 ret = of_clk_add_hw_provider(node, of_clk_hw_simple_get, clk); in fixed_mmio_clk_setup()
44 pr_err("%pOFn: failed to add clock provider\n", node); in fixed_mmio_clk_setup()
45 clk_hw_unregister(clk); in fixed_mmio_clk_setup()
46 clk = ERR_PTR(ret); in fixed_mmio_clk_setup()
49 return clk; in fixed_mmio_clk_setup()
56 CLK_OF_DECLARE(fixed_mmio_clk, "fixed-mmio-clock", of_fixed_mmio_clk_setup);
63 struct clk_hw *clk; in of_fixed_mmio_clk_probe() local
65 clk = fixed_mmio_clk_setup(pdev->dev.of_node); in of_fixed_mmio_clk_probe()
66 if (IS_ERR(clk)) in of_fixed_mmio_clk_probe()
67 return PTR_ERR(clk); in of_fixed_mmio_clk_probe()
69 platform_set_drvdata(pdev, clk); in of_fixed_mmio_clk_probe()
76 struct clk_hw *clk = platform_get_drvdata(pdev); in of_fixed_mmio_clk_remove() local
78 of_clk_del_provider(pdev->dev.of_node); in of_fixed_mmio_clk_remove()
79 clk_hw_unregister_fixed_rate(clk); in of_fixed_mmio_clk_remove()
83 { .compatible = "fixed-mmio-clock" },