Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: qcom: gcc-sdm845: use device tree match data

This driver will support more than one SoC's set of clocks, and set of
GDSCs. This behavior would be unclean with hard-coded static variables.
Support it by grabbing clocks, GDSCs, and BCRs in the match data.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220914013922.198778-3-mailingradian@gmail.com

authored by

Richard Acayan and committed by
Bjorn Andersson
8e90216d 657e9326

+4 -2
+4 -2
drivers/clk/qcom/gcc-sdm845.c
··· 3574 3574 }; 3575 3575 3576 3576 static const struct of_device_id gcc_sdm845_match_table[] = { 3577 - { .compatible = "qcom,gcc-sdm845" }, 3577 + { .compatible = "qcom,gcc-sdm845", .data = &gcc_sdm845_desc }, 3578 3578 { } 3579 3579 }; 3580 3580 MODULE_DEVICE_TABLE(of, gcc_sdm845_match_table); ··· 3600 3600 3601 3601 static int gcc_sdm845_probe(struct platform_device *pdev) 3602 3602 { 3603 + const struct qcom_cc_desc *gcc_desc; 3603 3604 struct regmap *regmap; 3604 3605 int ret; 3605 3606 ··· 3617 3616 if (ret) 3618 3617 return ret; 3619 3618 3620 - return qcom_cc_really_probe(pdev, &gcc_sdm845_desc, regmap); 3619 + gcc_desc = of_device_get_match_data(&pdev->dev); 3620 + return qcom_cc_really_probe(pdev, gcc_desc, regmap); 3621 3621 } 3622 3622 3623 3623 static struct platform_driver gcc_sdm845_driver = {