[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXv+5GGSKVwvQihGVJNch6qxv88t03BcBhN9tgB=K-5VvN+Cg@mail.gmail.com>
Date: Thu, 9 Oct 2025 15:19:27 +0800
From: Chen-Yu Tsai <wenst@...omium.org>
To: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Michael Turquette <mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>,
Dong Aisheng <aisheng.dong@....com>, Matthias Brugger <matthias.bgg@...il.com>,
Yassine Oudjana <y.oudjana@...tonmail.com>, Laura Nao <laura.nao@...labora.com>,
Nícolas F. R. A. Prado <nfraprado@...labora.com>,
Chia-I Wu <olvaffe@...il.com>, kernel@...labora.com, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, Stephen Boyd <sboyd@...eaurora.org>
Subject: Re: [PATCH v2 2/5] clk: mediatek: Refactor pll registration to pass device
On Thu, Oct 9, 2025 at 12:06 AM Nicolas Frattaroli
<nicolas.frattaroli@...labora.com> wrote:
>
> As it stands, mtk_clk_register_plls takes a struct device_node pointer
> as its first argument. This is a tragic happenstance, as it's trivial to
> get the device_node from a struct device, but the opposite not so much.
> The struct device is a much more useful thing to have passed down.
>
> Refactor mtk_clk_register_plls to take a struct device pointer instead
> of a struct device_node pointer, and fix up all users of this function.
>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
> ---
Actually,
> diff --git a/drivers/clk/mediatek/clk-pll.h b/drivers/clk/mediatek/clk-pll.h
> index d71c150ce83e4bb2fe78290c2d5570a90084246d..0e2b94b9cd4b56adceee3b04e9ab24c2526471da 100644
> --- a/drivers/clk/mediatek/clk-pll.h
> +++ b/drivers/clk/mediatek/clk-pll.h
> @@ -78,9 +78,9 @@ struct mtk_clk_pll {
> const struct mtk_pll_data *data;
> };
Please replace the |struct device_node| forward declaration at the top
of this file with one for |struct device|.
> -int mtk_clk_register_plls(struct device_node *node,
> - const struct mtk_pll_data *plls, int num_plls,
> - struct clk_hw_onecell_data *clk_data);
> +int mtk_clk_register_plls(struct device *dev, const struct mtk_pll_data *plls,
> + int num_plls, struct clk_hw_onecell_data *clk_data);
> +
> void mtk_clk_unregister_plls(const struct mtk_pll_data *plls, int num_plls,
> struct clk_hw_onecell_data *clk_data);
>
>
> --
> 2.51.0
>
Powered by blists - more mailing lists