Re: [PATCH v6 2/3] clk: mediatek: Add auxiliary bus support for sysclk reset

From: Rex-BC Chen (陳柏辰)
Date: Mon Oct 31 2022 - 01:58:48 EST


On Thu, 2022-10-27 at 16:46 -0700, Stephen Boyd wrote:
> Quoting Bo-Chen Chen (2022-10-21 03:48:03)
> > diff --git a/drivers/clk/mediatek/clk-mtk.c
> > b/drivers/clk/mediatek/clk-mtk.c
> > index 74408849ed86..61b7ee23738a 100644
> > --- a/drivers/clk/mediatek/clk-mtk.c
> > +++ b/drivers/clk/mediatek/clk-mtk.c
> > @@ -444,6 +444,63 @@ void mtk_clk_unregister_dividers(const struct
> > mtk_clk_divider *mcds, int num,
>
> [..]
> > +int mtk_reset_controller_register(struct device *dev, const char
> > *name)
> > +{
> > + struct auxiliary_device *adev;
> > + int ret;
> > +
> > + adev = mtk_reset_adev_alloc(dev, name);
> > + if (IS_ERR(adev))
> > + return PTR_ERR(adev);
> > +
> > + ret = auxiliary_device_add(adev);
> > + if (ret) {
> > + auxiliary_device_uninit(adev);
> > + return ret;
> > + }
> > +
> > + return devm_add_action_or_reset(dev,
> > mtk_reset_unregister_adev, adev);
>
> Can we have devm_auxiliary_device_add() that sets the parent and
> registers the device?

Hello Stephen,

I can't find the definition of devm_auxiliary_device_add(). Is there
any information for this function?

BRs,
Bo-Chen