Commit 9f93a0a4 authored by Luo Jie's avatar Luo Jie Committed by Bjorn Andersson
Browse files

clk: qcom: common: commonize qcom_cc_really_probe



The previous wrapper qcom_cc_really_probe takes the platform
device as parameter, which is limited to platform driver.

As for qca8k clock controller driver, which is registered as
the MDIO device, which also follows the qcom clock framework.

To commonize qcom_cc_really_probe, updating it to take the
struct device as parameter, so that the qcom_cc_really_probe
can be utilized by the previous platform device and the new
added MDIO device.

Also update the current clock controller drivers to take
&pdev->dev as parameter when calling qcom_cc_really_probe.

Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
Tested-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarLuo Jie <quic_luoj@quicinc.com>
Link: https://lore.kernel.org/r/20240605124541.2711467-4-quic_luoj@quicinc.com


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 80bbd1c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ static int apss_ipq6018_probe(struct platform_device *pdev)
	if (!regmap)
		return -ENODEV;

	ret = qcom_cc_really_probe(pdev, &apss_ipq6018_desc, regmap);
	ret = qcom_cc_really_probe(&pdev->dev, &apss_ipq6018_desc, regmap);
	if (ret)
		return ret;

+1 −1
Original line number Diff line number Diff line
@@ -1680,7 +1680,7 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev)
	clk_agera_pll_configure(&cam_cc_pll2, regmap, &cam_cc_pll2_config);
	clk_fabia_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);

	ret = qcom_cc_really_probe(pdev, &cam_cc_sc7180_desc, regmap);
	ret = qcom_cc_really_probe(&pdev->dev, &cam_cc_sc7180_desc, regmap);
	pm_runtime_put(&pdev->dev);
	if (ret < 0) {
		dev_err(&pdev->dev, "Failed to register CAM CC clocks\n");
+1 −1
Original line number Diff line number Diff line
@@ -2481,7 +2481,7 @@ static int cam_cc_sc7280_probe(struct platform_device *pdev)
	clk_lucid_pll_configure(&cam_cc_pll5, regmap, &cam_cc_pll5_config);
	clk_lucid_pll_configure(&cam_cc_pll6, regmap, &cam_cc_pll6_config);

	return qcom_cc_really_probe(pdev, &cam_cc_sc7280_desc, regmap);
	return qcom_cc_really_probe(&pdev->dev, &cam_cc_sc7280_desc, regmap);
}

static struct platform_driver cam_cc_sc7280_driver = {
+1 −1
Original line number Diff line number Diff line
@@ -3034,7 +3034,7 @@ static int camcc_sc8280xp_probe(struct platform_device *pdev)
	/* Keep some clocks always-on */
	qcom_branch_set_clk_en(regmap, 0xc1e4); /* CAMCC_GDSC_CLK */

	ret = qcom_cc_really_probe(pdev, &camcc_sc8280xp_desc, regmap);
	ret = qcom_cc_really_probe(&pdev->dev, &camcc_sc8280xp_desc, regmap);
	if (ret)
		goto err_disable;

+1 −1
Original line number Diff line number Diff line
@@ -1735,7 +1735,7 @@ static int cam_cc_sdm845_probe(struct platform_device *pdev)
	cam_cc_pll_config.l = 0x14;
	clk_fabia_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll_config);

	return qcom_cc_really_probe(pdev, &cam_cc_sdm845_desc, regmap);
	return qcom_cc_really_probe(&pdev->dev, &cam_cc_sdm845_desc, regmap);
}

static struct platform_driver cam_cc_sdm845_driver = {
Loading