Re: [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver
From: Stephen Boyd
Date: Tue Mar 24 2020 - 22:20:36 EST
Quoting Maxime Ripard (2020-03-23 03:56:16)
> Hi Stephen,
>
> On Thu, Mar 12, 2020 at 06:00:59PM -0700, Stephen Boyd wrote:
> > > + dvp->clks[1] = clk_register_gate(&pdev->dev, "hdmi1-108MHz",
> > > + parent, CLK_IS_CRITICAL,
> > > + base + DVP_HT_RPI_MISC_CONFIG, 4,
> > > + CLK_GATE_SET_TO_DISABLE, &dvp->reset.lock);
> >
> > Can we use clk_hw APIs, document why CLK_IS_CRITICAL, and use something
> > like clk_hw_register_gate_parent_data() so that we don't have to use
> > of_clk_get_parent_name() above?
>
> That function is new to me, and I'm not sure how I'm supposed to use it?
>
> It looks like clk_hw_register_gate, clk_hw_register_gate_parent_hw and
> clk_hw_register_gate_parent_data all call __clk_hw_register_gate with
> the same arguments, each expecting the parent_name, so they look
> equivalent?
>
> It looks like the original intent was to have the parent name, clk_hw
> or clk_parent_data as argument, but the macro itself was copy pasted
> without changing the arguments it's calling __clk_hw_register_gate
> with?
>
Yeah! It looks like nobody has tried to use it yet so you've come across
that problem where nobody reviews things and I just merge it anyway.
I'll send a fix shortly.