Re: [PATCH v2 2/2] clk: qcom: Add support for Global Clock Controller on QCS8300

From: Imran Shaik
Date: Mon Aug 26 2024 - 06:56:52 EST




On 8/23/2024 1:29 AM, Andrew Lunn wrote:
+static int gcc_qcs8300_probe(struct platform_device *pdev)
+{
+ struct regmap *regmap;
+ int ret;
+
+ regmap = qcom_cc_map(pdev, &gcc_qcs8300_desc);
+ if (IS_ERR(regmap))
+ return PTR_ERR(regmap);
+
+ ret = qcom_cc_register_rcg_dfs(regmap, gcc_dfs_clocks,
+ ARRAY_SIZE(gcc_dfs_clocks));
+ if (ret)
+ return ret;
+
+ /* Keep some clocks always enabled */

Sorry, but you need to explain why. Why cannot the camera driver
enable these clocks when it loads? Why cannot the display driver
enable these clocks when it loads.


These clocks are recommended to be kept always ON as per the HW design and also exposing clock structures and marking them critical in the kernel would lead to redundant code. Based on previous discussions with clock maintainers, it is recommended to keep such clocks enabled at probe and not model them. This approach is consistently followed for all other targets as well.

Thanks,
Imran

Andrew