All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Linus Walleij <linus.walleij@linaro.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [RFC 3/5] arm: dts: dt-bindings: Add Renesas RZ pinctrl header
Date: Mon, 30 Jan 2017 20:30:26 +0200	[thread overview]
Message-ID: <5227448.uVg4OnCqZq@avalon> (raw)
In-Reply-To: <CAMuHMdUmy2QkvRomf8euzB0QNkeCA=N8=rhY0GkObz8qn-UvMQ@mail.gmail.com>

On Thursday 26 Jan 2017 20:52:33 Geert Uytterhoeven wrote:
> On Wed, Jan 25, 2017 at 7:09 PM, Jacopo Mondi wrote:
> > Add dt-bindings header for Renesas RZ pincontroller.
> > The header defines macros for pin description and alternate function
> > numbers.
> > 
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> > 
> >  include/dt-bindings/pinctrl/pinctrl-renesas-rz.h | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> >  create mode 100644 include/dt-bindings/pinctrl/pinctrl-renesas-rz.h
> > 
> > diff --git a/include/dt-bindings/pinctrl/pinctrl-renesas-rz.h
> > b/include/dt-bindings/pinctrl/pinctrl-renesas-rz.h new file mode 100644
> > index 0000000..92816d4
> > --- /dev/null
> > +++ b/include/dt-bindings/pinctrl/pinctrl-renesas-rz.h
> > @@ -0,0 +1,19 @@
> > +/*
> > + * Defines macros and constants for Renesas RZ pin controller and muxer
> > + */
> > +
> > +#ifndef __DT_BINDINGS_PINCTRL_RENESAS_RZ_H
> > +#define __DT_BINDINGS_PINCTRL_RENESAS_RZ_H
> > +
> > +#define RZ_PIN(b, p) b p
> 
> And the advantage of this macro is?
> 
> > +#define ALTERNATE_FUNC_1       0
> > +#define ALTERNATE_FUNC_2       1
> > +#define ALTERNATE_FUNC_3       2
> > +#define ALTERNATE_FUNC_4       3
> > +#define ALTERNATE_FUNC_5       4
> > +#define ALTERNATE_FUNC_6       5
> > +#define ALTERNATE_FUNC_7       6
> > +#define ALTERNATE_FUNC_8       7
> 
> I have mixed feelings about these macros:
>   1. They're long to type,
>   2. They just map from n to n-1.
> 
> Why not use plain numbers 1..8 (the alternate function numbering in the
> datasheet is 1-based), and subtract 1 in the C code?

I was about to mention the same. I think you can drop this patch and use the 
numbers directly.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2017-01-30 18:30 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 18:09 [RFC 0/5] Renesas RZ series pinctrl driver Jacopo Mondi
2017-01-25 18:09 ` [RFC 1/5] pinctrl: rz-pfc: Add Renesas RZ pinctrl core module Jacopo Mondi
2017-01-26  2:58   ` Chris Brandt
2017-01-26  9:08     ` jacopo mondi
2017-01-26 14:19       ` Chris Brandt
2017-01-26 19:43   ` Geert Uytterhoeven
2017-01-30 19:19   ` Chris Brandt
2017-01-31  9:00     ` jacopo mondi
2017-01-31 13:48       ` Chris Brandt
2017-02-01 12:47         ` Laurent Pinchart
2017-02-01 15:21   ` Laurent Pinchart
2017-02-06 18:15     ` jacopo mondi
2017-02-06 18:28       ` Tony Lindgren
2017-02-07 10:27         ` jacopo mondi
2017-01-25 18:09 ` [RFC 2/5] pinctrl: rz-pfc: Add Renesas RZ/A1 pinctrl driver Jacopo Mondi
2017-01-26 19:49   ` Geert Uytterhoeven
2017-01-30 19:19   ` Chris Brandt
2017-01-31 10:39     ` Laurent Pinchart
2017-01-31 14:11       ` Chris Brandt
2017-02-01 15:25   ` Laurent Pinchart
2017-01-25 18:09 ` [RFC 3/5] arm: dts: dt-bindings: Add Renesas RZ pinctrl header Jacopo Mondi
2017-01-26 19:52   ` Geert Uytterhoeven
2017-01-30 18:30     ` Laurent Pinchart [this message]
2017-01-31  9:12       ` jacopo mondi
2017-01-31  9:31         ` Geert Uytterhoeven
2017-01-31 14:00           ` Chris Brandt
2017-01-25 18:09 ` [RFC 4/5] arm: dts: r7s1000: Add pincontroller node Jacopo Mondi
2017-01-26  9:49   ` Sergei Shtylyov
2017-01-26 19:54   ` Geert Uytterhoeven
2017-01-31 10:24     ` jacopo mondi
2017-01-31 10:34       ` Geert Uytterhoeven
2017-01-30 18:29   ` Laurent Pinchart
2017-01-30 19:39     ` Chris Brandt
2017-01-31 10:35       ` Laurent Pinchart
2017-01-31 14:08         ` Chris Brandt
2017-01-25 18:09 ` [RFC 5/5] arm: dts: genmai: Add SCIF2 pin group Jacopo Mondi
2017-01-26  9:51   ` Sergei Shtylyov
2017-01-30 18:17     ` Laurent Pinchart
2017-01-30 18:55       ` Geert Uytterhoeven
2017-01-26  2:57 ` [RFC 0/5] Renesas RZ series pinctrl driver Chris Brandt
2017-01-26 19:56 ` Geert Uytterhoeven
2017-01-27 16:47 ` [RFC fixes 0/2] FIX: " Jacopo Mondi
2017-01-27 16:47   ` [RFC fixes 1/2] arm: dts: genmai: Configure RIIC2 pins Jacopo Mondi
2017-01-30 18:49     ` Laurent Pinchart
2017-01-27 16:47   ` [RFC fixes 2/2] pinctrl: rz-pfc: Fix RZ/A1 pin function configuration Jacopo Mondi
2017-01-27 21:09   ` [RFC fixes 0/2] FIX: Renesas RZ series pinctrl driver Chris Brandt
2017-01-30 15:47     ` jacopo mondi
2017-01-30 16:29       ` Chris Brandt
2017-01-30 13:51 ` [RFC 0/5] " Linus Walleij
2017-01-30 15:53   ` Tony Lindgren
2017-01-30 16:18     ` jacopo mondi
2017-01-30 16:08   ` Geert Uytterhoeven
2017-01-30 18:59     ` Laurent Pinchart
2017-01-30 19:49       ` Chris Brandt

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=5227448.uVg4OnCqZq@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=jacopo+renesas@jmondi.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@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 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.