[PATCH v6 3/4] clk: mediatek: remove MT8195 vppsys/0/1 simple_probe
Moudy Ho (何宗原)
Moudy.Ho at mediatek.com
Mon Jan 30 17:57:07 PST 2023
On Mon, 2023-01-30 at 11:36 -0800, Stephen Boyd wrote:
> 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?
Hi Stephen,
Thanks for your time and hlep.
Refer to
https://lore.kernel.org/lkml/20230120092053.182923-4-angelogioacchino.delregno@collabora.com/
, both clk-mt8195-vpp0/1 need to add "&pdev->dev" to the 1st param. in
the API to match the modification.
Regards,
Moudy
More information about the Linux-mediatek
mailing list