SUPERH platform development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
Date: Thu, 28 Mar 2013 00:40:16 +0000	[thread overview]
Message-ID: <2142198.kb1Anh2P5F@avalon> (raw)
In-Reply-To: <1362941928-18115-11-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

Hi Simon,

On Thursday 28 March 2013 09:23:17 Simon Horman wrote:
> On Wed, Mar 27, 2013 at 11:30:49PM +0900, Magnus Damm wrote:
> > On Mon, Mar 11, 2013 at 3:58 AM, Laurent Pinchart wrote:
> > > All code use the GPIO numbers directly.
> > > 
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > > ---
> > 
> > Thanks for your work on this. I am late to the party as usual.
> > 
> > I am in general happy with the changes that you are making to convert
> > from old function and I/O GPIOs to using PINCTRL and GPIOS separately.
> > However, I have one comment related to this patch. I think you should
> > keep these patches as is, but I hope you can make an incremental fix,
> > please see my proposal below.
> 
> I was perhaps a little hasty, but I have queued-up this patch already.
> So I would also prefer an incremental change if there are any changes
> to be made.

Sure. I've already sent incremental patches as "sh-pfc: r8a7779: Improve 
readability with a new macro".

> > [snip]
> > 
> > > -       GPIO_GP_3_0, GPIO_GP_3_1, GPIO_GP_3_2, GPIO_GP_3_3,
> > > -       GPIO_GP_3_4, GPIO_GP_3_5, GPIO_GP_3_6, GPIO_GP_3_7,
> > > -       GPIO_GP_3_8, GPIO_GP_3_9, GPIO_GP_3_10, GPIO_GP_3_11,
> > > -       GPIO_GP_3_12, GPIO_GP_3_13, GPIO_GP_3_14, GPIO_GP_3_15,
> > > -       GPIO_GP_3_16, GPIO_GP_3_17, GPIO_GP_3_18, GPIO_GP_3_19,
> > > -       GPIO_GP_3_20, GPIO_GP_3_21, GPIO_GP_3_22, GPIO_GP_3_23,
> > > -       GPIO_GP_3_24, GPIO_GP_3_25, GPIO_GP_3_26, GPIO_GP_3_27,
> > > -       GPIO_GP_3_28, GPIO_GP_3_29, GPIO_GP_3_30, GPIO_GP_3_31,
> > 
> > In the data sheet and schematics it is possible to look up pins and
> > signals using names like GPIO_GP_n_x. Those names in the data sheet
> > and in the schematics match the enums in the header above. This makes
> > it easy to match the schematics with the code, something that is
> > important for anyone actually using our code.
> > 
> > However, while moving towards PINCTRL it seems that we're having a
> > regression in usefulness. Now we use pin numbers. On some SoCs that
> > maps well, but on others like the ones using GPIO_GP_n_x this turns
> > the board code into an unreadable mess.
> > 
> > For instance, if you find a GPIO in the board code with the value 123
> > and you want to match that to the data sheet, these days we have to
> > convert it manually. Perhaps to GPIO_3_29. And people have to convert
> > it the other way too when they are implementing the board code. These
> > kind of things are error prone. =)
> > 
> > Would it be possible to introduce a macro like GPIO_GP(n, m) that on
> > selected SoCs allows us to use the same style as before?
> > 
> > I suppose the same style could be used with the DT preprocessor. It's
> > funny, DT gains a preprocessor and we stop using it in C...

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2013-03-28  0:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 18:58 [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs Laurent Pinchart
2013-03-13 17:42 ` Linus Walleij
2013-03-27 14:30 ` Magnus Damm
2013-03-27 18:18 ` Laurent Pinchart
2013-03-28  0:23 ` Simon Horman
2013-03-28  0:40 ` Laurent Pinchart [this message]
2013-03-28  0:57 ` Simon Horman
2013-03-28  6:32 ` Magnus Damm

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=2142198.kb1Anh2P5F@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --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