[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aw3flahx3g4exezj5245cgrixasshvf26yibctxsd3l42ygwke@equdzipwspvx>
Date: Mon, 29 Sep 2025 19:31:21 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Anand Moon <linux.amoon@...il.com>
Cc: Frank Li <Frank.li@....com>, Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>, Krzysztof Wilczyński <kwilczynski@...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
On Sat, Sep 27, 2025 at 11:20:10AM +0530, Anand Moon wrote:
> 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.
>
The concern was with validating the DTS files with binding. Since it was in .txt
format, validation was not possible. But you are converting it to .yaml, so you
can safely use devm_clk_bulk_get_all().
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists