linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Turquette <mturquette@linaro.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 3/3] clk-mstp: add backwards comapt for indicies field
Date: Sun, 23 Feb 2014 20:23:07 +0000	[thread overview]
Message-ID: <20140223202307.22529.70622@quantum> (raw)
In-Reply-To: <1392314571-30107-3-git-send-email-ben.dooks@codethink.co.uk>

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
> 

  parent reply	other threads:[~2014-02-23 20:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-03-06 19:06 ` Ben Dooks
2014-03-07 10:10 ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140223202307.22529.70622@quantum \
    --to=mturquette@linaro.org \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).