Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1337860 > unrolled thread

[PATCH] clk: gpio: Really allow an optional clock= DT property

Started byStephen Boyd <sboyd@codeaurora.org>
First post2016-02-19 04:20 +0100
Last post2016-02-19 17:50 +0100
Articles 3 — 3 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.


Contents

  [PATCH] clk: gpio: Really allow an optional clock= DT property Stephen Boyd <sboyd@codeaurora.org> - 2016-02-19 04:20 +0100
    Re: [PATCH] clk: gpio: Really allow an optional clock= DT property Michael Turquette <mturquette@baylibre.com> - 2016-02-19 17:20 +0100
    Re: [PATCH] clk: gpio: Really allow an optional clock= DT property Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-19 17:50 +0100

#1337860 — [PATCH] clk: gpio: Really allow an optional clock= DT property

FromStephen Boyd <sboyd@codeaurora.org>
Date2016-02-19 04:20 +0100
Subject[PATCH] clk: gpio: Really allow an optional clock= DT property
Message-ID<r3JLP-7bz-9@gated-at.bofh.it>
We mis-merged the original patch from Russell here and so the
patch went almost all the way, except that we still failed to
probe when there wasn't a clocks property in the DT node. Allow
that case by making a negative value from
of_clk_get_parent_count() into "no parents", like the original
patch did.

Fixes: 7ed88aa2efa5 ("clk: fix clk-gpio.c with optional clock= DT property")
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/clk/clk-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c
index 19fed65587e8..7b09a265d79f 100644
--- a/drivers/clk/clk-gpio.c
+++ b/drivers/clk/clk-gpio.c
@@ -289,7 +289,7 @@ static void __init of_gpio_clk_setup(struct device_node *node,
 
 	num_parents = of_clk_get_parent_count(node);
 	if (num_parents < 0)
-		return;
+		num_parents = 0;
 
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
 	if (!data)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

[toc] | [next] | [standalone]


#1338327

FromMichael Turquette <mturquette@baylibre.com>
Date2016-02-19 17:20 +0100
Message-ID<r3VWH-7Ih-47@gated-at.bofh.it>
In reply to#1337860
On Thu, Feb 18, 2016 at 7:12 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>
> We mis-merged the original patch from Russell here and so the
> patch went almost all the way, except that we still failed to
> probe when there wasn't a clocks property in the DT node. Allow
> that case by making a negative value from
> of_clk_get_parent_count() into "no parents", like the original
> patch did.
>
> Fixes: 7ed88aa2efa5 ("clk: fix clk-gpio.c with optional clock= DT property")
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

Ack.

Regards,
Mike

> ---
>  drivers/clk/clk-gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c
> index 19fed65587e8..7b09a265d79f 100644
> --- a/drivers/clk/clk-gpio.c
> +++ b/drivers/clk/clk-gpio.c
> @@ -289,7 +289,7 @@ static void __init of_gpio_clk_setup(struct device_node *node,
>
>         num_parents = of_clk_get_parent_count(node);
>         if (num_parents < 0)
> -               return;
> +               num_parents = 0;
>
>         data = kzalloc(sizeof(*data), GFP_KERNEL);
>         if (!data)
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>



-- 
Michael Turquette
CEO
BayLibre - At the Heart of Embedded Linux
http://baylibre.com/

[toc] | [prev] | [next] | [standalone]


#1338343

FromRussell King - ARM Linux <linux@arm.linux.org.uk>
Date2016-02-19 17:50 +0100
Message-ID<r3WpH-7Yk-3@gated-at.bofh.it>
In reply to#1337860
On Thu, Feb 18, 2016 at 07:12:05PM -0800, Stephen Boyd wrote:
> We mis-merged the original patch from Russell here and so the
> patch went almost all the way, except that we still failed to
> probe when there wasn't a clocks property in the DT node. Allow
> that case by making a negative value from
> of_clk_get_parent_count() into "no parents", like the original
> patch did.

NAK.  I'm not testing this patch, when I've already spent more than
enough time (a) developing the original patch and testing that, and
(b) re-diagnosing what's going wrong, and re-fixing the fuck up,
and testing that fix.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web