Lines Matching refs:mcd
389 const struct mtk_clk_divider *mcd = &mcds[i]; in mtk_clk_register_dividers() local
391 if (!IS_ERR_OR_NULL(clk_data->hws[mcd->id])) { in mtk_clk_register_dividers()
393 mcd->id); in mtk_clk_register_dividers()
397 hw = clk_hw_register_divider(NULL, mcd->name, mcd->parent_name, in mtk_clk_register_dividers()
398 mcd->flags, base + mcd->div_reg, mcd->div_shift, in mtk_clk_register_dividers()
399 mcd->div_width, mcd->clk_divider_flags, lock); in mtk_clk_register_dividers()
402 pr_err("Failed to register clk %s: %pe\n", mcd->name, in mtk_clk_register_dividers()
407 clk_data->hws[mcd->id] = hw; in mtk_clk_register_dividers()
414 const struct mtk_clk_divider *mcd = &mcds[i]; in mtk_clk_register_dividers() local
416 if (IS_ERR_OR_NULL(clk_data->hws[mcd->id])) in mtk_clk_register_dividers()
419 clk_hw_unregister_divider(clk_data->hws[mcd->id]); in mtk_clk_register_dividers()
420 clk_data->hws[mcd->id] = ERR_PTR(-ENOENT); in mtk_clk_register_dividers()
436 const struct mtk_clk_divider *mcd = &mcds[i - 1]; in mtk_clk_unregister_dividers() local
438 if (IS_ERR_OR_NULL(clk_data->hws[mcd->id])) in mtk_clk_unregister_dividers()
441 clk_hw_unregister_divider(clk_data->hws[mcd->id]); in mtk_clk_unregister_dividers()
442 clk_data->hws[mcd->id] = ERR_PTR(-ENOENT); in mtk_clk_unregister_dividers()
449 const struct mtk_clk_desc *mcd; in mtk_clk_simple_probe() local
454 mcd = of_device_get_match_data(&pdev->dev); in mtk_clk_simple_probe()
455 if (!mcd) in mtk_clk_simple_probe()
458 clk_data = mtk_alloc_clk_data(mcd->num_clks); in mtk_clk_simple_probe()
462 r = mtk_clk_register_gates_with_dev(node, mcd->clks, mcd->num_clks, in mtk_clk_simple_probe()
473 if (mcd->rst_desc) { in mtk_clk_simple_probe()
475 mcd->rst_desc); in mtk_clk_simple_probe()
483 mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data); in mtk_clk_simple_probe()
492 const struct mtk_clk_desc *mcd = of_device_get_match_data(&pdev->dev); in mtk_clk_simple_remove() local
497 mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data); in mtk_clk_simple_remove()