Re: [PATCH v5] clk: qcom: Add support for Camera Clock Controller on QCS8300
From: Imran Shaik
Date: Wed Mar 26 2025 - 07:18:54 EST
On 3/25/2025 5:08 AM, Stephen Boyd wrote:
> 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.
>
Thanks Stephen for your review.
Sure, I will use device_is_compatible() and post another series.
Regards,
Imran