Skip to content

Commit 34e000c

Browse files
Kiciukandersson
authored andcommitted
clk: qcom: hfpll: Allow matching pdata
HFPLL driver can be used to drive PLLs also on different SoCs like MSM8976 On MSM8976 each PLL gets it own different configuration, add matching pdata to driver to support multiple configurations. Signed-off-by: Adam Skladowski <a39.skl@gmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230812112534.8610-4-a39.skl@gmail.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 500a460 commit 34e000c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/clk/qcom/hfpll.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <linux/module.h>
77
#include <linux/platform_device.h>
88
#include <linux/of.h>
9+
#include <linux/of_device.h>
910
#include <linux/clk.h>
1011
#include <linux/clk-provider.h>
1112
#include <linux/regmap.h>
@@ -32,7 +33,7 @@ static const struct hfpll_data hdata = {
3233
};
3334

3435
static const struct of_device_id qcom_hfpll_match_table[] = {
35-
{ .compatible = "qcom,hfpll" },
36+
{ .compatible = "qcom,hfpll", .data = &hdata },
3637
{ }
3738
};
3839
MODULE_DEVICE_TABLE(of, qcom_hfpll_match_table);
@@ -83,7 +84,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
8384

8485
init.parent_data = &pdata;
8586

86-
h->d = &hdata;
87+
h->d = of_device_get_match_data(&pdev->dev);
8788
h->clkr.hw.init = &init;
8889
spin_lock_init(&h->lock);
8990

0 commit comments

Comments
 (0)