[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240430052941.GE3301@thinkpad>
Date: Tue, 30 Apr 2024 10:59:41 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: Bjorn Andersson <andersson@...nel.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>,
Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
linux-pci@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: qcom: Switch to devm_clk_bulk_get_all() API to get
the clocks from Devicetree
On Wed, Apr 17, 2024 at 10:05:45PM +0200, Konrad Dybcio wrote:
> On 17.04.2024 9:02 AM, Manivannan Sadhasivam wrote:
> > There is no need for the device drivers to validate the clocks defined in
> > Devicetree. The validation should be performed by the DT schema and the
> > drivers should just get all the clocks from DT. Right now the driver
> > hardcodes the clock info and validates them against DT which is redundant.
> >
> > So use devm_clk_bulk_get_all() that just gets all the clocks defined in DT
> > and get rid of all static clocks info from the driver. This simplifies the
> > driver.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> > ---
>
> Even better, you can push the bulk_get_all to a common function so as not
> to duplicate it for every gen!
>
I don't see a benefit in doing so. It is just a function call and using a helper
will cause inconsistency with other API usage in this driver. I prefer to keep
it as it is.
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists