Re: [PATCH v2 11/23] clk: mediatek: Switch to mtk_clk_simple_probe() where possible

From: Miles Chen
Date: Wed Dec 28 2022 - 02:51:05 EST


> mtk_clk_simple_probe() is a function that registers mtk gate clocks
> and, if reset data is present, a reset controller and across all of
> the MTK clock drivers, such a function is duplicated many times:
> switch to the common mtk_clk_simple_probe() function for all of the
> clock drivers that are registering as platform drivers.
>

...snip...

> +
> +static const struct of_device_id of_match_clk_mt8183_simple[] = {
> + { .compatible = "mediatek,mt8183-infracfg", .data = &infra_desc },
> + { .compatible = "mediatek,mt8183-pericfg", .data = &peri_desc, },
> + { /* sentinel */ }
> +};
> +
> +static struct platform_driver clk_mt8183_simple_drv = {
> + .probe = mtk_clk_simple_probe,
> + .remove = mtk_clk_simple_remove,
> + .driver = {
> + .name = "clk-mt8183-simple",
> + .of_match_table = of_match_clk_mt8183_simple,
> + },
>

cool, replace clk_mt8183_infra_probe and clk_mt8183_peri_probe with
mtk_clk_simple_probe

Reviewed-by: Miles Chen <miles.chen@xxxxxxxxxxxx>