Re: [PATCH v2 2/2] clk: ultrarisc: add DP1000 clock driver

From: Jia Wang

Date: Mon Jul 13 2026 - 05:19:31 EST


On 2026-07-08 10:30 -0400, Brian Masney wrote:
> On Wed, Jul 08, 2026 at 03:53:06PM +0800, Jia Wang wrote:
> > On 2026-07-07 15:54 -0400, Brian Masney wrote:
> > > On Wed, Jun 17, 2026 at 02:02:55PM +0800, Jia Wang wrote:
> > > > +static struct clk_hw *
> > > > +ultrarisc_clk_hw_register_composite(struct device *dev, const char *name,
> > > > + const char * const *parent_names,
> > > > + int num_parents, struct clk_hw *mux_hw,
> > > > + const struct clk_ops *mux_ops,
> > > > + struct clk_hw *rate_hw,
> > > > + const struct clk_ops *rate_ops,
> > > > + struct clk_hw *gate_hw,
> > > > + const struct clk_ops *gate_ops,
> > > > + unsigned long flags)
> > > > +{
> > > > + struct clk_hw *hw;
> > > > + int ret;
> > > > +
> > > > + hw = clk_hw_register_composite(dev, name, parent_names, num_parents,
> > > > + mux_hw, mux_ops, rate_hw, rate_ops,
> > > > + gate_hw, gate_ops, flags);
> > > > + if (IS_ERR(hw))
> > > > + return hw;
> > > > +
> > > > + ret = devm_add_action_or_reset(dev, ultrarisc_clk_unregister_composite,
> > > > + hw);
> > >
> > > Use devm_clk_hw_register_composite_pdata()
> > >
> >
> > I originally used clk_hw_register_composite() together with
> > devm_add_action_or_reset() because devm_clk_hw_register_composite_pdata()
> > is not currently exported, while this driver can be built as a module.
> >
> > If exporting it is acceptable, I can add a preparatory patch in this series
> > to export it and then switch the driver to use that helper.
>
> Yes, I think that exporting this makes sense.
>

Thanks. I'll add a preparatory patch to export the helper and update the
driver to use it in the next version.

> Brian
>
>

Best regards,
Jia Wang