[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7292158ac0cd6b944d9d1f01314d24b1@kernel.org>
Date: Mon, 24 Mar 2025 16:38:41 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Bjorn Andersson <andersson@...nel.org>, Imran Shaik <quic_imrashai@...cinc.com>, Michael Turquette <mturquette@...libre.com>
Cc: Ajit Pandey <quic_ajipan@...cinc.com>, Taniya Das <quic_tdas@...cinc.com>, Jagadeesh Kona <quic_jkona@...cinc.com>, Satya Priya Kakitapalli <quic_skakitap@...cinc.com>, linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org, Imran Shaik <quic_imrashai@...cinc.com>, Dmitry Baryshkov <lumag@...nel.org>
Subject: Re: [PATCH v5] clk: qcom: Add support for Camera Clock Controller on QCS8300
Quoting Imran Shaik (2025-03-20 20:56:43)
> diff --git a/drivers/clk/qcom/camcc-sa8775p.c b/drivers/clk/qcom/camcc-sa8775p.c
> index 11bd2e234811..bd75f59d3ffe 100644
> --- a/drivers/clk/qcom/camcc-sa8775p.c
> +++ b/drivers/clk/qcom/camcc-sa8775p.c
> @@ -1811,6 +1830,7 @@ static const struct qcom_cc_desc cam_cc_sa8775p_desc = {
> };
>
> static const struct of_device_id cam_cc_sa8775p_match_table[] = {
> + { .compatible = "qcom,qcs8300-camcc" },
> { .compatible = "qcom,sa8775p-camcc" },
> { }
> };
> @@ -1841,10 +1861,83 @@ static int cam_cc_sa8775p_probe(struct platform_device *pdev)
> clk_lucid_evo_pll_configure(&cam_cc_pll4, regmap, &cam_cc_pll4_config);
> clk_lucid_evo_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config);
>
> - /* Keep some clocks always enabled */
> - qcom_branch_set_clk_en(regmap, 0x13194); /* CAM_CC_CAMNOC_XO_CLK */
> - qcom_branch_set_clk_en(regmap, 0x131ec); /* CAM_CC_GDSC_CLK */
> - qcom_branch_set_clk_en(regmap, 0x13208); /* CAM_CC_SLEEP_CLK */
> + if (of_device_is_compatible(pdev->dev.of_node, "qcom,qcs8300-camcc")) {
Can we just use device_is_compatible() here? Then we're not specific to
DT. Or better yet, use the device match data to signal this instead of
checking compatible again, and possibly getting it wrong due to a typo
somewhere.
Powered by blists - more mailing lists