Commit 9e406674 authored by Jorge Ramirez-Ortiz's avatar Jorge Ramirez-Ortiz Committed by Stephen Boyd

clk: qcom: hfpll: register as clock provider

Make the output of the high frequency pll a clock provider.
On the QCS404 this PLL controls cpu frequency scaling.
Co-developed-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: default avatarJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lkml.kernel.org/r/20191125135910.679310-4-niklas.cassel@linaro.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 4168c1ca
...@@ -57,6 +57,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) ...@@ -57,6 +57,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
.num_parents = 1, .num_parents = 1,
.ops = &clk_ops_hfpll, .ops = &clk_ops_hfpll,
}; };
int ret;
h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL); h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL);
if (!h) if (!h)
...@@ -79,7 +80,14 @@ static int qcom_hfpll_probe(struct platform_device *pdev) ...@@ -79,7 +80,14 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
h->clkr.hw.init = &init; h->clkr.hw.init = &init;
spin_lock_init(&h->lock); spin_lock_init(&h->lock);
return devm_clk_register_regmap(&pdev->dev, &h->clkr); ret = devm_clk_register_regmap(dev, &h->clkr);
if (ret) {
dev_err(dev, "failed to register regmap clock: %d\n", ret);
return ret;
}
return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
&h->clkr.hw);
} }
static struct platform_driver qcom_hfpll_driver = { static struct platform_driver qcom_hfpll_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment