Re: [PATCH v6 3/4] clk: mediatek: remove MT8195 vppsys/0/1 simple_probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 30/01/23 20:36, Stephen Boyd ha scritto:
Quoting Moudy Ho (2023-01-17 19:15:08)
diff --git a/drivers/clk/mediatek/clk-mt8195-vpp0.c b/drivers/clk/mediatek/clk-mt8195-vpp0.c
index bf2939c3a023..6d5800f69f6c 100644
--- a/drivers/clk/mediatek/clk-mt8195-vpp0.c
+++ b/drivers/clk/mediatek/clk-mt8195-vpp0.c
@@ -86,26 +86,54 @@ static const struct mtk_gate vpp0_clks[] = {
         GATE_VPP0_2(CLK_VPP0_WARP1_MDP_DL_ASYNC, "vpp0_warp1_mdp_dl_async", "top_wpe_vpp", 3),
  };
-static const struct mtk_clk_desc vpp0_desc = {
-       .clks = vpp0_clks,
-       .num_clks = ARRAY_SIZE(vpp0_clks),
-};
+static int clk_mt8195_vpp0_probe(struct platform_device *pdev)
+{
+       struct device *dev = &pdev->dev;
+       struct device_node *node = dev->parent->of_node;
+       struct clk_onecell_data *clk_data;
+       int r;
-static const struct of_device_id of_match_clk_mt8195_vpp0[] = {
-       {
-               .compatible = "mediatek,mt8195-vppsys0",
-               .data = &vpp0_desc,
-       }, {
-               /* sentinel */
-       }
-};
+       clk_data = mtk_alloc_clk_data(CLK_VPP0_NR_CLK);
+       if (!clk_data)
+               return -ENOMEM;
+
+       r = mtk_clk_register_gates(node, vpp0_clks, ARRAY_SIZE(vpp0_clks), clk_data);

This API is wrecked by a patch from AngeloGioacchino. Can you resend, or
tell me which device should be used here?

mtk_clk_register_gates(&pdev->dev, node, vpp0_clks, ......);


...with that change, for this patch:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>

P.S.: Next cleanup round will introduce mtk_clk_pdev_simple_probe()

Cheers,
Angelo



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux