[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bddf658c-c9b1-48c7-b39c-0720e9d4c934@collabora.com>
Date: Wed, 1 Oct 2025 13:40:52 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>,
Michael Turquette <mturquette@...libre.com>, Stephen Boyd
<sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>,
Guangjie Song <guangjie.song@...iatek.com>,
Laura Nao <laura.nao@...labora.com>,
NĂcolas F. R. A. Prado <nfraprado@...labora.com>,
Yassine Oudjana <y.oudjana@...tonmail.com>
Cc: kernel@...labora.com, Krzysztof Kozlowski
<krzysztof.kozlowski@...aro.org>, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH 3/4] clk: mediatek: Pass device to clk_hw_register for
PLLs
Il 29/09/25 14:13, Nicolas Frattaroli ha scritto:
> Passing the struct device pointer to clk_hw_register allows for runtime
> power management to work for the registered clocks. However, the
> mediatek PLL clocks do not do this.
>
> Change this by adding a struct device pointer argument to
> mtk_clk_register_pll, and fix up the only other user of it. Also add a
> new member to the struct mtk_clk_pll for the struct device pointer,
> which is set by mtk_clk_register_pll and is used by
> mtk_clk_register_pll_ops.
>
> If mtk_clk_register_pll is called with a NULL struct device pointer,
> then everything still works as expected; the clock core will simply
> treat them as previously, i.e. without runtime power management.
>
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
> ---
> drivers/clk/mediatek/clk-pll.c | 9 ++++++---
> drivers/clk/mediatek/clk-pll.h | 4 +++-
> drivers/clk/mediatek/clk-pllfh.c | 2 +-
> 3 files changed, 10 insertions(+), 5 deletions(-)
>
..snip..
> diff --git a/drivers/clk/mediatek/clk-pllfh.c b/drivers/clk/mediatek/clk-pllfh.c
> index 83630ee07ee976bf980c8cf2dd35ea24c1b40821..62bfe4a480f14a0a742fb094aff0e6d1a79fe0c3 100644
> --- a/drivers/clk/mediatek/clk-pllfh.c
> +++ b/drivers/clk/mediatek/clk-pllfh.c
> @@ -220,7 +220,7 @@ int mtk_clk_register_pllfhs(struct device_node *node,
> if (use_fhctl)
> hw = mtk_clk_register_pllfh(pll, pllfh, base);
> else
> - hw = mtk_clk_register_pll(pll, base);
> + hw = mtk_clk_register_pll(NULL, pll, base);
>
Seriously, you've done all that work in patch [2/4], and now you're doing that
just only with PLLFH?
Nicolas, c'mon. It's just 5 minutes ahead. :-D
Cheers,
Angelo
> if (IS_ERR(hw)) {
> pr_err("Failed to register %s clk %s: %ld\n",
>
Powered by blists - more mailing lists