[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221027234622.14589C433D6@smtp.kernel.org>
Date: Thu, 27 Oct 2022 16:46:19 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Bo-Chen Chen <rex-bc.chen@...iatek.com>, matthias.bgg@...il.com,
mturquette@...libre.com, p.zabel@...gutronix.de
Cc: runyang.chen@...iatek.com, miles.chen@...iatek.com,
wenst@...omium.org, angelogioacchino.delregno@...labora.com,
nfraprado@...labora.com, linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
Project_Global_Chrome_Upstream_Group@...iatek.com,
Bo-Chen Chen <rex-bc.chen@...iatek.com>
Subject: Re: [PATCH v6 2/3] clk: mediatek: Add auxiliary bus support for sysclk reset
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?
Powered by blists - more mailing lists