diff options
author | Richard Acayan <mailingradian@gmail.com> | 2022-09-14 04:39:21 +0300 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2022-09-14 05:20:34 +0300 |
commit | 8e90216d2db99f0b883be3b40d5b581437dc4a5d (patch) | |
tree | b0b5c86c6787ea49d9a88616abadc367f19cba02 /drivers/clk/qcom/gcc-sdm845.c | |
parent | 657e9326658c1c570eb1e8fd122a4a7936433673 (diff) | |
download | linux-8e90216d2db99f0b883be3b40d5b581437dc4a5d.tar.xz |
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
Diffstat (limited to 'drivers/clk/qcom/gcc-sdm845.c')
-rw-r--r-- | drivers/clk/qcom/gcc-sdm845.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/clk/qcom/gcc-sdm845.c b/drivers/clk/qcom/gcc-sdm845.c index 58aa3ec9a7fc..cd6e4e41dc9b 100644 --- a/drivers/clk/qcom/gcc-sdm845.c +++ b/drivers/clk/qcom/gcc-sdm845.c @@ -3574,7 +3574,7 @@ static const struct qcom_cc_desc gcc_sdm845_desc = { }; static const struct of_device_id gcc_sdm845_match_table[] = { - { .compatible = "qcom,gcc-sdm845" }, + { .compatible = "qcom,gcc-sdm845", .data = &gcc_sdm845_desc }, { } }; MODULE_DEVICE_TABLE(of, gcc_sdm845_match_table); @@ -3600,6 +3600,7 @@ static const struct clk_rcg_dfs_data gcc_dfs_clocks[] = { static int gcc_sdm845_probe(struct platform_device *pdev) { + const struct qcom_cc_desc *gcc_desc; struct regmap *regmap; int ret; @@ -3616,7 +3617,8 @@ static int gcc_sdm845_probe(struct platform_device *pdev) if (ret) return ret; - return qcom_cc_really_probe(pdev, &gcc_sdm845_desc, regmap); + gcc_desc = of_device_get_match_data(&pdev->dev); + return qcom_cc_really_probe(pdev, gcc_desc, regmap); } static struct platform_driver gcc_sdm845_driver = { |