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


Groups > linux.kernel > #1512362

Re: [PATCH 1/4] pinctrl: Introduce generic #pinctrl-cells and pinctrl_parse_index_with_args

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] pinctrl: Introduce generic #pinctrl-cells and pinctrl_parse_index_with_args
Date 2016-10-31 07:20 +0100
Message-ID <sye6R-74m-3@gated-at.bofh.it> (permalink)
References <swd5g-8aC-19@gated-at.bofh.it> <swd5g-8aC-49@gated-at.bofh.it> <swTHc-31G-41@gated-at.bofh.it> <swTHc-31G-39@gated-at.bofh.it> <sxiFB-2q3-63@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Oct 28, 2016 at 09:53:38AM -0700, Tony Lindgren wrote:
> * Tony Lindgren <tony@atomide.com> [161027 07:59]:
> > * Linus Walleij <linus.walleij@linaro.org> [161027 00:57]:
> > > On Tue, Oct 25, 2016 at 6:45 PM, Tony Lindgren <tony@atomide.com> wrote:
> > > > +/*
> > > > + * For pinctrl binding, typically #pinctrl-cells is for the pin controller
> > > > + * device, so either parent or grandparent. See pinctrl-bindings.txt.
> > > > + */
> > > > +static int pinctrl_find_cells_size(const struct device_node *np,
> > > > +                                  const char *cells_name)
> > > > +{
> > > > +       int cells_size, error;
> > > > +
> > > > +       error = of_property_read_u32(np->parent, cells_name, &cells_size);
> > > > +       if (error) {
> > > > +               error = of_property_read_u32(np->parent->parent,
> > > > +                                            cells_name, &cells_size);
> > > > +               if (error)
> > > > +                       return -ENOENT;
> > > > +       }
> > > > +
> > > > +       return cells_size;
> > > > +}
> > > 
> > > Can't we just hardcode this to "#pinctrl-cells" and skip the cells_name
> > > parameter? We can parametrize it the day we need it instead.
> > 
> > Sure we can do that.
> > 
> > > The rest of the helpers look nice and clean.
> > 
> > OK cool thanks,
> 
> Below is an updated version of this patch with documentation updated
> and cells_name removed. I'll repost the whole series once the DT
> binding has been reviewed.
> 
> Regards,
> 
> Tony
> 8< -------------------------
> From tony Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Tue, 25 Oct 2016 08:33:34 -0700
> Subject: [PATCH] pinctrl: Introduce generic #pinctrl-cells and
>  pinctrl_parse_index_with_args
> 
> Introduce #pinctrl-cells helper binding and generic helper functions
> pinctrl_count_index_with_args() and pinctrl_parse_index_with_args().
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  .../bindings/pinctrl/pinctrl-bindings.txt          |  44 ++++++-

Acked-by: Rob Herring <robh@kernel.org>

>  drivers/pinctrl/devicetree.c                       | 144 +++++++++++++++++++++
>  drivers/pinctrl/devicetree.h                       |  21 +++
>  3 files changed, 208 insertions(+), 1 deletion(-)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 1/4] pinctrl: Introduce generic #pinctrl-cells and  pinctrl_parse_index_with_args Tony Lindgren <tony@atomide.com> - 2016-10-27 16:20 +0200
  Re: [PATCH 1/4] pinctrl: Introduce generic #pinctrl-cells and  pinctrl_parse_index_with_args Tony Lindgren <tony@atomide.com> - 2016-10-28 19:00 +0200
    Re: [PATCH 1/4] pinctrl: Introduce generic #pinctrl-cells and  pinctrl_parse_index_with_args Rob Herring <robh@kernel.org> - 2016-10-31 07:20 +0100
    Re: [PATCH 1/4] pinctrl: Introduce generic #pinctrl-cells and pinctrl_parse_index_with_args Linus Walleij <linus.walleij@linaro.org> - 2016-11-04 22:40 +0100

csiph-web