Skip to content

Commit 32956dd

Browse files
committed
clk/soc: mediatek: mt6779: Bind clock driver from platform device
The mmsys driver is now the top level entry point for the multimedia system (mmsys), we bind the clock driver by creating a platform device. We also bind the MediaTek DRM driver which is not yet implement and therefor will errror out for now. Signed-off-by: Matthias Brugger <[email protected]> Reviewed-by: Chun-Kuang Hu <[email protected]> Acked-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
1 parent cad4e37 commit 32956dd

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

drivers/clk/mediatek/clk-mt6779-mm.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,11 @@ static const struct mtk_gate mm_clks[] = {
8484
GATE_MM1(CLK_MM_DISP_OVL_FBDC, "mm_disp_ovl_fbdc", "mm_sel", 16),
8585
};
8686

87-
static const struct of_device_id of_match_clk_mt6779_mm[] = {
88-
{ .compatible = "mediatek,mt6779-mmsys", },
89-
{}
90-
};
91-
9287
static int clk_mt6779_mm_probe(struct platform_device *pdev)
9388
{
89+
struct device *dev = &pdev->dev;
90+
struct device_node *node = dev->parent->of_node;
9491
struct clk_onecell_data *clk_data;
95-
struct device_node *node = pdev->dev.of_node;
9692

9793
clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
9894

@@ -106,7 +102,6 @@ static struct platform_driver clk_mt6779_mm_drv = {
106102
.probe = clk_mt6779_mm_probe,
107103
.driver = {
108104
.name = "clk-mt6779-mm",
109-
.of_match_table = of_match_clk_mt6779_mm,
110105
},
111106
};
112107

drivers/soc/mediatek/mtk-mmsys.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data = {
8787
.clk_driver = "clk-mt2712-mm",
8888
};
8989

90+
static const struct mtk_mmsys_driver_data mt6779_mmsys_driver_data = {
91+
.clk_driver = "clk-mt6779-mm",
92+
};
93+
9094
static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = {
9195
.clk_driver = "clk-mt6797-mm",
9296
};
@@ -344,6 +348,10 @@ static const struct of_device_id of_match_mtk_mmsys[] = {
344348
.compatible = "mediatek,mt2712-mmsys",
345349
.data = &mt2712_mmsys_driver_data,
346350
},
351+
{
352+
.compatible = "mediatek,mt6779-mmsys",
353+
.data = &mt6779_mmsys_driver_data,
354+
},
347355
{
348356
.compatible = "mediatek,mt6797-mmsys",
349357
.data = &mt6797_mmsys_driver_data,

0 commit comments

Comments
 (0)