[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191125135910.679310-4-niklas.cassel@linaro.org>
Date: Mon, 25 Nov 2019 14:59:05 +0100
From: Niklas Cassel <niklas.cassel@...aro.org>
To: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: linux-arm-msm@...r.kernel.org, amit.kucheria@...aro.org,
sboyd@...nel.org,
Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@...aro.org>,
Niklas Cassel <niklas.cassel@...aro.org>,
Michael Turquette <mturquette@...libre.com>,
linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 3/7] clk: qcom: hfpll: register as clock provider
From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@...aro.org>
Make the output of the high frequency pll a clock provider.
On the QCS404 this PLL controls cpu frequency scaling.
Co-developed-by: Niklas Cassel <niklas.cassel@...aro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@...aro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@...aro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
Acked-by: Stephen Boyd <sboyd@...nel.org>
---
Changes since v2:
-None
drivers/clk/qcom/hfpll.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/hfpll.c b/drivers/clk/qcom/hfpll.c
index a6de7101430c..e64c0fd82fe4 100644
--- a/drivers/clk/qcom/hfpll.c
+++ b/drivers/clk/qcom/hfpll.c
@@ -57,6 +57,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
.num_parents = 1,
.ops = &clk_ops_hfpll,
};
+ int ret;
h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL);
if (!h)
@@ -79,7 +80,14 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
h->clkr.hw.init = &init;
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 = {
--
2.23.0
Powered by blists - more mailing lists