Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1411669 > unrolled thread
| Started by | Stephen Boyd <stephen.boyd@linaro.org> |
|---|---|
| First post | 2016-06-02 01:30 +0200 |
| Last post | 2016-06-02 03:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 03/34] clk: highbank: Migrate to clk_hw based registration and OF APIs Stephen Boyd <stephen.boyd@linaro.org> - 2016-06-02 01:30 +0200
Re: [PATCH 03/34] clk: highbank: Migrate to clk_hw based registration and OF APIs Rob Herring <robh@kernel.org> - 2016-06-02 03:10 +0200
| From | Stephen Boyd <stephen.boyd@linaro.org> |
|---|---|
| Date | 2016-06-02 01:30 +0200 |
| Subject | [PATCH 03/34] clk: highbank: Migrate to clk_hw based registration and OF APIs |
| Message-ID | <rFnKi-6FR-9@gated-at.bofh.it> |
Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers in this driver, allowing us to
move closer to a clear split of consumer and provider clk APIs.
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
See commit 58657d189a2f and it's children for details on this
new registration API.
drivers/clk/clk-highbank.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c
index be3a21abb185..727ed8e1bb72 100644
--- a/drivers/clk/clk-highbank.c
+++ b/drivers/clk/clk-highbank.c
@@ -275,7 +275,6 @@ static const struct clk_ops periclk_ops = {
static __init struct clk *hb_clk_init(struct device_node *node, const struct clk_ops *ops)
{
u32 reg;
- struct clk *clk;
struct hb_clk *hb_clk;
const char *clk_name = node->name;
const char *parent_name;
@@ -308,13 +307,13 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
hb_clk->hw.init = &init;
- clk = clk_register(NULL, &hb_clk->hw);
- if (WARN_ON(IS_ERR(clk))) {
+ rc = clk_hw_register(NULL, &hb_clk->hw);
+ if (WARN_ON(rc)) {
kfree(hb_clk);
return NULL;
}
- rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
- return clk;
+ rc = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &hb_clk->hw);
+ return hb_clk->hw.clk;
}
static void __init hb_pll_init(struct device_node *node)
--
2.7.4
[toc] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2016-06-02 03:10 +0200 |
| Subject | Re: [PATCH 03/34] clk: highbank: Migrate to clk_hw based registration and OF APIs |
| Message-ID | <rFpj3-7HA-1@gated-at.bofh.it> |
| In reply to | #1411669 |
On Wed, Jun 1, 2016 at 6:15 PM, Stephen Boyd <stephen.boyd@linaro.org> wrote:
> Now that we have clk_hw based provider APIs to register clks, we
> can get rid of struct clk pointers in this driver, allowing us to
> move closer to a clear split of consumer and provider clk APIs.
>
> Cc: Rob Herring <robh@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
> ---
>
> See commit 58657d189a2f and it's children for details on this
> new registration API.
>
> drivers/clk/clk-highbank.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c
> index be3a21abb185..727ed8e1bb72 100644
> --- a/drivers/clk/clk-highbank.c
> +++ b/drivers/clk/clk-highbank.c
> @@ -275,7 +275,6 @@ static const struct clk_ops periclk_ops = {
> static __init struct clk *hb_clk_init(struct device_node *node, const struct clk_ops *ops)
> {
> u32 reg;
> - struct clk *clk;
> struct hb_clk *hb_clk;
> const char *clk_name = node->name;
> const char *parent_name;
> @@ -308,13 +307,13 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
>
> hb_clk->hw.init = &init;
>
> - clk = clk_register(NULL, &hb_clk->hw);
> - if (WARN_ON(IS_ERR(clk))) {
> + rc = clk_hw_register(NULL, &hb_clk->hw);
> + if (WARN_ON(rc)) {
> kfree(hb_clk);
> return NULL;
> }
> - rc = of_clk_add_provider(node, of_clk_src_simple_get, clk);
> - return clk;
> + rc = of_clk_add_hw_provider(node, of_clk_hw_simple_get, &hb_clk->hw);
> + return hb_clk->hw.clk;
> }
>
> static void __init hb_pll_init(struct device_node *node)
> --
> 2.7.4
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web