diff options
author | AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | 2023-03-06 17:04:51 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-03-13 21:50:13 +0300 |
commit | 252091242404aa7cee131a827a04b8e3d9b88daa (patch) | |
tree | b94ceeb473585e5f9379a99b35a0e338fb1b24b9 /drivers/clk/mediatek/clk-mt8186-mm.c | |
parent | 4b476b0f45343177c4666cec593dd1acf649bc09 (diff) | |
download | linux-252091242404aa7cee131a827a04b8e3d9b88daa.tar.xz |
clk: mediatek: clk-mtk: Introduce clk_mtk_pdev_{probe,remove}()
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@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Tested-by: Miles Chen <miles.chen@mediatek.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230306140543.1813621-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/mediatek/clk-mt8186-mm.c')
0 files changed, 0 insertions, 0 deletions