All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] clk-mstp: add backwards comapt for indicies field
@ 2014-02-13 18:02 Ben Dooks
  2014-02-13 23:15 ` Laurent Pinchart
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ben Dooks @ 2014-02-13 18:02 UTC (permalink / raw)
  To: linux-sh

Add comaptibiltiy for older device trees by checking to see if
the clock-indicies property is there and falling back to the
older renesas,clock-indices field.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 drivers/clk/shmobile/clk-mstp.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c
index 95a2aa7..d1ee757 100644
--- a/drivers/clk/shmobile/clk-mstp.c
+++ b/drivers/clk/shmobile/clk-mstp.c
@@ -156,6 +156,7 @@ cpg_mstp_clock_register(const char *name, const char *parent_name,
 static void __init cpg_mstp_clocks_init(struct device_node *np)
 {
 	struct mstp_clock_group *group;
+	const char *idxname;
 	struct clk **clks;
 	unsigned int i;
 
@@ -184,6 +185,11 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
 	for (i = 0; i < MSTP_MAX_CLOCKS; ++i)
 		clks[i] = ERR_PTR(-ENOENT);
 
+	if (of_find_property(np, "clock-indices"))
+		idxname = "clock-indices";
+	else
+		idxname = "renesas,clock-indices";
+
 	for (i = 0; i < MSTP_MAX_CLOCKS; ++i) {
 		const char *parent_name;
 		const char *name;
@@ -197,8 +203,7 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
 			continue;
 
 		parent_name = of_clk_get_parent_name(np, i);
-		ret = of_property_read_u32_index(np, "clock-indices", i,
-						 &clkidx);
+		ret = of_property_read_u32_index(np, idxname, i, &clkidx);
 		if (parent_name = NULL || ret < 0)
 			break;
 
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] clk-mstp: add backwards comapt for indicies field
  2014-02-13 18:02 [PATCH 3/3] clk-mstp: add backwards comapt for indicies field Ben Dooks
@ 2014-02-13 23:15 ` Laurent Pinchart
  2014-02-14 10:27 ` Ben Dooks
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-02-13 23:15 UTC (permalink / raw)
  To: linux-sh

Hi Ben,

Thank you for the patch.

On Thursday 13 February 2014 18:02:51 Ben Dooks wrote:
> Add comaptibiltiy for older device trees by checking to see if
> the clock-indicies property is there and falling back to the
> older renesas,clock-indices field.

I would drop this patch. The Renesas clocks DT bindings are too new (v3.14-
rc1, and for multiplatform kernels only) to be considered as stable in my 
opinion.

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/clk/shmobile/clk-mstp.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/shmobile/clk-mstp.c
> b/drivers/clk/shmobile/clk-mstp.c index 95a2aa7..d1ee757 100644
> --- a/drivers/clk/shmobile/clk-mstp.c
> +++ b/drivers/clk/shmobile/clk-mstp.c
> @@ -156,6 +156,7 @@ cpg_mstp_clock_register(const char *name, const char
> *parent_name, static void __init cpg_mstp_clocks_init(struct device_node
> *np)
>  {
>  	struct mstp_clock_group *group;
> +	const char *idxname;
>  	struct clk **clks;
>  	unsigned int i;
> 
> @@ -184,6 +185,11 @@ static void __init cpg_mstp_clocks_init(struct
> device_node *np) for (i = 0; i < MSTP_MAX_CLOCKS; ++i)
>  		clks[i] = ERR_PTR(-ENOENT);
> 
> +	if (of_find_property(np, "clock-indices"))
> +		idxname = "clock-indices";
> +	else
> +		idxname = "renesas,clock-indices";
> +
>  	for (i = 0; i < MSTP_MAX_CLOCKS; ++i) {
>  		const char *parent_name;
>  		const char *name;
> @@ -197,8 +203,7 @@ static void __init cpg_mstp_clocks_init(struct
> device_node *np) continue;
> 
>  		parent_name = of_clk_get_parent_name(np, i);
> -		ret = of_property_read_u32_index(np, "clock-indices", i,
> -						 &clkidx);
> +		ret = of_property_read_u32_index(np, idxname, i, &clkidx);
>  		if (parent_name = NULL || ret < 0)
>  			break;

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] clk-mstp: add backwards comapt for indicies field
  2014-02-13 18:02 [PATCH 3/3] clk-mstp: add backwards comapt for indicies field Ben Dooks
  2014-02-13 23:15 ` Laurent Pinchart
@ 2014-02-14 10:27 ` Ben Dooks
  2014-02-14 14:36 ` Laurent Pinchart
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ben Dooks @ 2014-02-14 10:27 UTC (permalink / raw)
  To: linux-sh

On 13/02/14 23:15, Laurent Pinchart wrote:
> Hi Ben,
>
> Thank you for the patch.
>
> On Thursday 13 February 2014 18:02:51 Ben Dooks wrote:
>> Add comaptibiltiy for older device trees by checking to see if
>> the clock-indicies property is there and falling back to the
>> older renesas,clock-indices field.
>
> I would drop this patch. The Renesas clocks DT bindings are too new (v3.14-
> rc1, and for multiplatform kernels only) to be considered as stable in my
> opinion.

Ok, Magnus earlier was all in favour of not breaking things.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] clk-mstp: add backwards comapt for indicies field
  2014-02-13 18:02 [PATCH 3/3] clk-mstp: add backwards comapt for indicies field Ben Dooks
  2014-02-13 23:15 ` Laurent Pinchart
  2014-02-14 10:27 ` Ben Dooks
@ 2014-02-14 14:36 ` Laurent Pinchart
  2014-02-23 20:23 ` Mike Turquette
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-02-14 14:36 UTC (permalink / raw)
  To: linux-sh

Hi Ben,

On Friday 14 February 2014 10:27:01 Ben Dooks wrote:
> On 13/02/14 23:15, Laurent Pinchart wrote:
> > On Thursday 13 February 2014 18:02:51 Ben Dooks wrote:
> >> Add comaptibiltiy for older device trees by checking to see if
> >> the clock-indicies property is there and falling back to the
> >> older renesas,clock-indices field.
> > 
> > I would drop this patch. The Renesas clocks DT bindings are too new
> > (v3.14-rc1, and for multiplatform kernels only) to be considered as stable
> > in my opinion.
> 
> Ok, Magnus earlier was all in favour of not breaking things.

I'm not too much for breaking things either ;-) We really need to discuss the 
general DT bindings stability problem though.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] clk-mstp: add backwards comapt for indicies field
  2014-02-13 18:02 [PATCH 3/3] clk-mstp: add backwards comapt for indicies field Ben Dooks
                   ` (2 preceding siblings ...)
  2014-02-14 14:36 ` Laurent Pinchart
@ 2014-02-23 20:23 ` Mike Turquette
  2014-03-06 19:06 ` Ben Dooks
  2014-03-07 10:10 ` Laurent Pinchart
  5 siblings, 0 replies; 7+ messages in thread
From: Mike Turquette @ 2014-02-23 20:23 UTC (permalink / raw)
  To: linux-sh

Quoting Laurent Pinchart (2014-02-13 15:15:19)
> Hi Ben,
> 
> Thank you for the patch.
> 
> On Thursday 13 February 2014 18:02:51 Ben Dooks wrote:
> > Add comaptibiltiy for older device trees by checking to see if
> > the clock-indicies property is there and falling back to the
> > older renesas,clock-indices field.
> 
> I would drop this patch. The Renesas clocks DT bindings are too new (v3.14-
> rc1, and for multiplatform kernels only) to be considered as stable in my 
> opinion.

I agree. It does take a little time and practice to know how to shape
the binding.

Regards,
Mike

> 
> > Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> > ---
> >  drivers/clk/shmobile/clk-mstp.c | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/clk/shmobile/clk-mstp.c
> > b/drivers/clk/shmobile/clk-mstp.c index 95a2aa7..d1ee757 100644
> > --- a/drivers/clk/shmobile/clk-mstp.c
> > +++ b/drivers/clk/shmobile/clk-mstp.c
> > @@ -156,6 +156,7 @@ cpg_mstp_clock_register(const char *name, const char
> > *parent_name, static void __init cpg_mstp_clocks_init(struct device_node
> > *np)
> >  {
> >       struct mstp_clock_group *group;
> > +     const char *idxname;
> >       struct clk **clks;
> >       unsigned int i;
> > 
> > @@ -184,6 +185,11 @@ static void __init cpg_mstp_clocks_init(struct
> > device_node *np) for (i = 0; i < MSTP_MAX_CLOCKS; ++i)
> >               clks[i] = ERR_PTR(-ENOENT);
> > 
> > +     if (of_find_property(np, "clock-indices"))
> > +             idxname = "clock-indices";
> > +     else
> > +             idxname = "renesas,clock-indices";
> > +
> >       for (i = 0; i < MSTP_MAX_CLOCKS; ++i) {
> >               const char *parent_name;
> >               const char *name;
> > @@ -197,8 +203,7 @@ static void __init cpg_mstp_clocks_init(struct
> > device_node *np) continue;
> > 
> >               parent_name = of_clk_get_parent_name(np, i);
> > -             ret = of_property_read_u32_index(np, "clock-indices", i,
> > -                                              &clkidx);
> > +             ret = of_property_read_u32_index(np, idxname, i, &clkidx);
> >               if (parent_name = NULL || ret < 0)
> >                       break;
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] clk-mstp: add backwards comapt for indicies field
  2014-02-13 18:02 [PATCH 3/3] clk-mstp: add backwards comapt for indicies field Ben Dooks
                   ` (3 preceding siblings ...)
  2014-02-23 20:23 ` Mike Turquette
@ 2014-03-06 19:06 ` Ben Dooks
  2014-03-07 10:10 ` Laurent Pinchart
  5 siblings, 0 replies; 7+ messages in thread
From: Ben Dooks @ 2014-03-06 19:06 UTC (permalink / raw)
  To: linux-sh

On 13/02/14 23:15, Laurent Pinchart wrote:
> Hi Ben,
>
> Thank you for the patch.
>
> On Thursday 13 February 2014 18:02:51 Ben Dooks wrote:
>> Add comaptibiltiy for older device trees by checking to see if
>> the clock-indicies property is there and falling back to the
>> older renesas,clock-indices field.
>
> I would drop this patch. The Renesas clocks DT bindings are too new (v3.14-
> rc1, and for multiplatform kernels only) to be considered as stable in my
> opinion.

I think this may be required as the current amount of
development work being done means that either we need
to be at a point where we can merge the driver change
via Simon's tree, or to put the compatibility in and
hope the driver update goes in first before we merge
the dts/dtsi changes.

I'm not sure which is the best way to do this?


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] clk-mstp: add backwards comapt for indicies field
  2014-02-13 18:02 [PATCH 3/3] clk-mstp: add backwards comapt for indicies field Ben Dooks
                   ` (4 preceding siblings ...)
  2014-03-06 19:06 ` Ben Dooks
@ 2014-03-07 10:10 ` Laurent Pinchart
  5 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-03-07 10:10 UTC (permalink / raw)
  To: linux-sh

Hi Ben,

On Thursday 06 March 2014 19:06:35 Ben Dooks wrote:
> On 13/02/14 23:15, Laurent Pinchart wrote:
> > Hi Ben,
> > 
> > Thank you for the patch.
> > 
> > On Thursday 13 February 2014 18:02:51 Ben Dooks wrote:
> >> Add comaptibiltiy for older device trees by checking to see if
> >> the clock-indicies property is there and falling back to the
> >> older renesas,clock-indices field.
> > 
> > I would drop this patch. The Renesas clocks DT bindings are too new
> > (v3.14-rc1, and for multiplatform kernels only) to be considered as stable
> > in my opinion.
> 
> I think this may be required as the current amount of development work being
> done means that either we need to be at a point where we can merge the
> driver change via Simon's tree, or to put the compatibility in and hope the
> driver update goes in first before we merge the dts/dtsi changes.
> 
> I'm not sure which is the best way to do this?

I assume that backward compat will get the most votes, so I won't fight 
against it :-)

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-07 10:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13 18:02 [PATCH 3/3] clk-mstp: add backwards comapt for indicies field Ben Dooks
2014-02-13 23:15 ` Laurent Pinchart
2014-02-14 10:27 ` Ben Dooks
2014-02-14 14:36 ` Laurent Pinchart
2014-02-23 20:23 ` Mike Turquette
2014-03-06 19:06 ` Ben Dooks
2014-03-07 10:10 ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.