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

Stephen Boyd sboyd at kernel.org
Thu Oct 27 16:46:19 PDT 2022


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?



More information about the linux-arm-kernel mailing list