| 43 | } |
| 44 | |
| 45 | static rt_err_t fixed_clk_probe(struct rt_platform_device *pdev) |
| 46 | { |
| 47 | rt_err_t err = RT_EOK; |
| 48 | struct rt_clk_fixed_rate *clk_fixed = rt_calloc(1, sizeof(*clk_fixed)); |
| 49 | |
| 50 | if (clk_fixed) |
| 51 | { |
| 52 | err = fixed_clk_ofw_init(pdev, clk_fixed); |
| 53 | } |
| 54 | else |
| 55 | { |
| 56 | err = -RT_ENOMEM; |
| 57 | } |
| 58 | |
| 59 | if (!err) |
| 60 | { |
| 61 | err = rt_clk_register(&clk_fixed->clk, RT_NULL); |
| 62 | } |
| 63 | |
| 64 | if (err && clk_fixed) |
| 65 | { |
| 66 | rt_free(clk_fixed); |
| 67 | } |
| 68 | |
| 69 | return err; |
| 70 | } |
| 71 | |
| 72 | static const struct rt_ofw_node_id fixed_clk_ofw_ids[] = |
| 73 | { |
nothing calls this directly
no test coverage detected