[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJpoAKJqDH1z44_93kYLoAeAZ30TQe+=4ty1UgMydLUCxJQ@mail.gmail.com>
Date: Thu, 27 Jun 2024 18:14:47 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Devi Priya <quic_devipriy@...cinc.com>
Cc: Konrad Dybcio <konrad.dybcio@...aro.org>, andersson@...nel.org, mturquette@...libre.com,
sboyd@...nel.org, robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
catalin.marinas@....com, will@...nel.org, p.zabel@...gutronix.de,
richardcochran@...il.com, geert+renesas@...der.be, neil.armstrong@...aro.org,
arnd@...db.de, m.szyprowski@...sung.com, nfraprado@...labora.com,
u-kumar1@...com, linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH V4 5/7] clk: qcom: Add NSS clock Controller driver for IPQ9574
On Thu, 27 Jun 2024 at 08:37, Devi Priya <quic_devipriy@...cinc.com> wrote:
>
>
>
> On 6/25/2024 10:33 PM, Konrad Dybcio wrote:
> > On 25.06.2024 9:05 AM, Devi Priya wrote:
> >> Add Networking Sub System Clock Controller(NSSCC) driver for ipq9574 based
> >> devices.
> >>
> >> Signed-off-by: Devi Priya <quic_devipriy@...cinc.com>
> >> Tested-by: Alexandru Gagniuc <mr.nuke.me@...il.com>
> >> ---
> >
> > [...]
> >
> >> + struct regmap *regmap;
> >> + struct qcom_cc_desc nsscc_ipq9574_desc = nss_cc_ipq9574_desc;
> >
> > Why?
> Sure, Will drop this in V6.
> >
> >> + struct clk *nsscc_clk;
> >> + struct device_node *np = (&pdev->dev)->of_node;
> >> + int ret;
> >> +
> >> + nsscc_clk = of_clk_get(np, 11);
> >> + if (IS_ERR(nsscc_clk))
> >> + return PTR_ERR(nsscc_clk);
> >> +
> >> + ret = clk_prepare_enable(nsscc_clk);
> >
> > pm_clk_add()? And definitely drop the 11 literal, nobody could ever guess
> > or maintain magic numbers
> Hi Konrad,
>
> nsscc clk isn't related to power management clocks.
> Also, I believe it might require the usage of clock-names.
No. First of all, you can use pm_clk_add_clk. And even better than
that, you can add pm_clk_add_by_index().
> Do you suggest adding a macro for the literal (11)?
No, add it to DT_something enumeration.
> Please correct me if I'm wrong.
--
With best wishes
Dmitry
Powered by blists - more mailing lists