[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANAwSgT3inDQZ40uFtXwFze2m4hZUvnyKTek3PQ9jb6picgi-A@mail.gmail.com>
Date: Sat, 27 Sep 2025 11:20:10 +0530
From: Anand Moon <linux.amoon@...il.com>
To: Frank Li <Frank.li@....com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>, Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kwilczynski@...nel.org>,
Manivannan Sadhasivam <mani@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Thierry Reding <thierry.reding@...il.com>, Jonathan Hunter <jonathanh@...dia.com>,
"open list:PCI SUBSYSTEM" <linux-pci@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@...r.kernel.org>,
"open list:TEGRA ARCHITECTURE SUPPORT" <linux-tegra@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 2/5] PCI: tegra: Simplify clock handling by using
clk_bulk*() functions
Hi Frank,
On Fri, 26 Sept 2025 at 23:42, Frank Li <Frank.li@....com> wrote:
>
> On Fri, Sep 26, 2025 at 12:57:43PM +0530, Anand Moon wrote:
> > Currently, the driver acquires clocks and prepare/enable/disable/unprepare
> > the clocks individually thereby making the driver complex to read.
> >
> > The driver can be simplified by using the clk_bulk*() APIs.
> >
> > Use:
> > - devm_clk_bulk_get() API to acquire all the clocks
> > - clk_bulk_prepare_enable() to prepare/enable clocks
> > - clk_bulk_disable_unprepare() APIs to disable/unprepare them in bulk
> >
> > Following change also removes the legacy has_cml_clk flag and its associated
> > conditional logic. Instead, the driver now relies on the clock definitions from
> > the device tree to determine the correct clock sequencing.
> > This reduces hardcoded dependencies and improves the driver's maintainability.
> >
> > Cc: Thierry Reding <thierry.reding@...il.com>
> > Cc: Jon Hunter <jonathanh@...dia.com>
> > Signed-off-by: Anand Moon <linux.amoon@...il.com>
> > ---
> > v1: Switch from devm_clk_bulk_get_all() -> devm_clk_bulk_get() with
> > fix clks array.
>
> why not use devm_clk_bulk_get_all()?
>
My RFC used this devm_clk_bulk_get_all() which could work for all the SoC,
However, Jon recommended switching to named clocks, following the
approach used in .
but Jon suggested to use clock names as per dwmac-tegra.c driver.
[0] https://lore.kernel.org/linux-tegra/8fac00fe-2ad4-4202-a6f2-c5043f7343f9@nvidia.com/
> Frank
Thanks
-Anand
Powered by blists - more mailing lists