[PATCH v1 02/45] clk: mediatek: clk-mtk: Introduce clk_mtk_pdev_{probe,remove}()

Chen-Yu Tsai wenst at chromium.org
Mon Feb 6 21:59:39 PST 2023


On Mon, Feb 6, 2023 at 11:29 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno at collabora.com> wrote:
>
> Introduce functions clk_mtk_pdev_probe() and clk_mtk_pdev_remove():
> these will be useful to commonize the probe and remove handlers for
> multimedia (clk-mtxxxx-mm) drivers as these are registered by the
> mtk-mmsys driver instead of having their own devicetree compatible.
>
> In order to do this, the main logic of clk_mtk_simple{probe,remove}()
> was moved to new static __clk_mtk_simple_{probe,remove}() functions
> that take as parameter a pointer to struct device_node because when
> registering the clocks from mtk-mmsys we want to pass a pointer to
> the clock driver's parent (which is, obviously, mtk-mmsys) struct
> device_node instead.
>
> As for the clock driver's platform data: for the devicetree case, we
> keep using the standard match_data mechanism, else we retrieve it
> from an id_table.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>

Reviewed-by: Chen-Yu Tsai <wenst at chromium.org>



More information about the linux-arm-kernel mailing list