[PATCH V4 5/7] clk: qcom: Add NSS clock Controller driver for IPQ9574
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Thu Jun 27 08:14:47 PDT 2024
On Thu, 27 Jun 2024 at 08:37, Devi Priya <quic_devipriy at quicinc.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 at quicinc.com>
> >> Tested-by: Alexandru Gagniuc <mr.nuke.me at gmail.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
More information about the linux-arm-kernel
mailing list