All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
@ 2013-03-10 18:58 Laurent Pinchart
  2013-03-13 17:42 ` Linus Walleij
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-03-10 18:58 UTC (permalink / raw)
  To: linux-sh

All code use the GPIO numbers directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm/mach-shmobile/include/mach/r8a7779.h | 317 --------------------------
 1 file changed, 317 deletions(-)

diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
index 8ea0ad1..5896922 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
@@ -4,323 +4,6 @@
 #include <linux/sh_clk.h>
 #include <linux/pm_domain.h>
 
-/* Pin Function Controller:
- * GPIO_FN_xx - GPIO used to select pin function
- * GPIO_GP_x_x - GPIO mapped to real I/O pin on CPU
- */
-enum {
-	GPIO_GP_0_0, GPIO_GP_0_1, GPIO_GP_0_2, GPIO_GP_0_3,
-	GPIO_GP_0_4, GPIO_GP_0_5, GPIO_GP_0_6, GPIO_GP_0_7,
-	GPIO_GP_0_8, GPIO_GP_0_9, GPIO_GP_0_10, GPIO_GP_0_11,
-	GPIO_GP_0_12, GPIO_GP_0_13, GPIO_GP_0_14, GPIO_GP_0_15,
-	GPIO_GP_0_16, GPIO_GP_0_17, GPIO_GP_0_18, GPIO_GP_0_19,
-	GPIO_GP_0_20, GPIO_GP_0_21, GPIO_GP_0_22, GPIO_GP_0_23,
-	GPIO_GP_0_24, GPIO_GP_0_25, GPIO_GP_0_26, GPIO_GP_0_27,
-	GPIO_GP_0_28, GPIO_GP_0_29, GPIO_GP_0_30, GPIO_GP_0_31,
-
-	GPIO_GP_1_0, GPIO_GP_1_1, GPIO_GP_1_2, GPIO_GP_1_3,
-	GPIO_GP_1_4, GPIO_GP_1_5, GPIO_GP_1_6, GPIO_GP_1_7,
-	GPIO_GP_1_8, GPIO_GP_1_9, GPIO_GP_1_10, GPIO_GP_1_11,
-	GPIO_GP_1_12, GPIO_GP_1_13, GPIO_GP_1_14, GPIO_GP_1_15,
-	GPIO_GP_1_16, GPIO_GP_1_17, GPIO_GP_1_18, GPIO_GP_1_19,
-	GPIO_GP_1_20, GPIO_GP_1_21, GPIO_GP_1_22, GPIO_GP_1_23,
-	GPIO_GP_1_24, GPIO_GP_1_25, GPIO_GP_1_26, GPIO_GP_1_27,
-	GPIO_GP_1_28, GPIO_GP_1_29, GPIO_GP_1_30, GPIO_GP_1_31,
-
-	GPIO_GP_2_0, GPIO_GP_2_1, GPIO_GP_2_2, GPIO_GP_2_3,
-	GPIO_GP_2_4, GPIO_GP_2_5, GPIO_GP_2_6, GPIO_GP_2_7,
-	GPIO_GP_2_8, GPIO_GP_2_9, GPIO_GP_2_10, GPIO_GP_2_11,
-	GPIO_GP_2_12, GPIO_GP_2_13, GPIO_GP_2_14, GPIO_GP_2_15,
-	GPIO_GP_2_16, GPIO_GP_2_17, GPIO_GP_2_18, GPIO_GP_2_19,
-	GPIO_GP_2_20, GPIO_GP_2_21, GPIO_GP_2_22, GPIO_GP_2_23,
-	GPIO_GP_2_24, GPIO_GP_2_25, GPIO_GP_2_26, GPIO_GP_2_27,
-	GPIO_GP_2_28, GPIO_GP_2_29, GPIO_GP_2_30, GPIO_GP_2_31,
-
-	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,
-
-	GPIO_GP_4_0, GPIO_GP_4_1, GPIO_GP_4_2, GPIO_GP_4_3,
-	GPIO_GP_4_4, GPIO_GP_4_5, GPIO_GP_4_6, GPIO_GP_4_7,
-	GPIO_GP_4_8, GPIO_GP_4_9, GPIO_GP_4_10, GPIO_GP_4_11,
-	GPIO_GP_4_12, GPIO_GP_4_13, GPIO_GP_4_14, GPIO_GP_4_15,
-	GPIO_GP_4_16, GPIO_GP_4_17, GPIO_GP_4_18, GPIO_GP_4_19,
-	GPIO_GP_4_20, GPIO_GP_4_21, GPIO_GP_4_22, GPIO_GP_4_23,
-	GPIO_GP_4_24, GPIO_GP_4_25, GPIO_GP_4_26, GPIO_GP_4_27,
-	GPIO_GP_4_28, GPIO_GP_4_29, GPIO_GP_4_30, GPIO_GP_4_31,
-
-	GPIO_GP_5_0, GPIO_GP_5_1, GPIO_GP_5_2, GPIO_GP_5_3,
-	GPIO_GP_5_4, GPIO_GP_5_5, GPIO_GP_5_6, GPIO_GP_5_7,
-	GPIO_GP_5_8, GPIO_GP_5_9, GPIO_GP_5_10, GPIO_GP_5_11,
-	GPIO_GP_5_12, GPIO_GP_5_13, GPIO_GP_5_14, GPIO_GP_5_15,
-	GPIO_GP_5_16, GPIO_GP_5_17, GPIO_GP_5_18, GPIO_GP_5_19,
-	GPIO_GP_5_20, GPIO_GP_5_21, GPIO_GP_5_22, GPIO_GP_5_23,
-	GPIO_GP_5_24, GPIO_GP_5_25, GPIO_GP_5_26, GPIO_GP_5_27,
-	GPIO_GP_5_28, GPIO_GP_5_29, GPIO_GP_5_30, GPIO_GP_5_31,
-
-	GPIO_GP_6_0, GPIO_GP_6_1, GPIO_GP_6_2,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3_DATA2, GPIO_FN_SSI_WS1, GPIO_FN_TS_SPSYNC1,
-	GPIO_FN_HSCK0_B, GPIO_FN_VI1_G3, GPIO_FN_VI3_DATA3,
-	GPIO_FN_SSI_SCK2, GPIO_FN_TS_SDAT1, GPIO_FN_SCL1_C, GPIO_FN_HTX0_B,
-	GPIO_FN_VI1_G4, GPIO_FN_VI3_DATA4, GPIO_FN_SSI_WS2, GPIO_FN_SDA1_C,
-	GPIO_FN_SIM_RST_B, GPIO_FN_HRX0_B, GPIO_FN_VI1_G5, GPIO_FN_VI3_DATA5,
-	GPIO_FN_GPS_CLK, GPIO_FN_FSE, GPIO_FN_SIM_D_B,
-	GPIO_FN_VI1_G6, GPIO_FN_VI3_DATA6, GPIO_FN_GPS_SIGN, GPIO_FN_FRB,
-	GPIO_FN_SIM_CLK_B, GPIO_FN_VI1_G7, GPIO_FN_VI3_DATA7,
-	GPIO_FN_GPS_MAG, GPIO_FN_FCE,
-};
-
 struct platform_device;
 
 struct r8a7779_pm_ch {
-- 
1.8.1.5


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

* Re: [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
  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
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2013-03-13 17:42 UTC (permalink / raw)
  To: linux-sh

On Sun, Mar 10, 2013 at 7:58 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:

> All code use the GPIO numbers directly.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
  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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Magnus Damm @ 2013-03-27 14:30 UTC (permalink / raw)
  To: linux-sh

Hi Laurent,

On Mon, Mar 11, 2013 at 3:58 AM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> 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.

[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...

Thanks,

/ magnus

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

* Re: [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
  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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-03-27 18:18 UTC (permalink / raw)
  To: linux-sh

Hi Magnus,

On Wednesday 27 March 2013 23:30:49 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.
> 
> [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?

We've discussed that before, and I totally agree. I will submit patches to do 
so.

> 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


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

* Re: [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
  2013-03-10 18:58 [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs Laurent Pinchart
                   ` (2 preceding siblings ...)
  2013-03-27 18:18 ` Laurent Pinchart
@ 2013-03-28  0:23 ` Simon Horman
  2013-03-28  0:40 ` Laurent Pinchart
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-03-28  0:23 UTC (permalink / raw)
  To: linux-sh

On Wed, Mar 27, 2013 at 11:30:49PM +0900, Magnus Damm wrote:
> Hi Laurent,
> 
> On Mon, Mar 11, 2013 at 3:58 AM, Laurent Pinchart
> <laurent.pinchart+renesas@ideasonboard.com> 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.

> 
> [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...
> 
> Thanks,
> 
> / magnus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
  2013-03-10 18:58 [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs Laurent Pinchart
                   ` (3 preceding siblings ...)
  2013-03-28  0:23 ` Simon Horman
@ 2013-03-28  0:40 ` Laurent Pinchart
  2013-03-28  0:57 ` Simon Horman
  2013-03-28  6:32 ` Magnus Damm
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2013-03-28  0:40 UTC (permalink / raw)
  To: linux-sh

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


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

* Re: [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
  2013-03-10 18:58 [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs Laurent Pinchart
                   ` (4 preceding siblings ...)
  2013-03-28  0:40 ` Laurent Pinchart
@ 2013-03-28  0:57 ` Simon Horman
  2013-03-28  6:32 ` Magnus Damm
  6 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2013-03-28  0:57 UTC (permalink / raw)
  To: linux-sh

On Thu, Mar 28, 2013 at 01:40:16AM +0100, Laurent Pinchart wrote:
> 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".

Thanks, those changes look find to me.

> > > [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
> 

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

* Re: [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs
  2013-03-10 18:58 [PATCH/RFC 10/12] ARM: shmobile: r8a7779: Remove all GPIOs Laurent Pinchart
                   ` (5 preceding siblings ...)
  2013-03-28  0:57 ` Simon Horman
@ 2013-03-28  6:32 ` Magnus Damm
  6 siblings, 0 replies; 8+ messages in thread
From: Magnus Damm @ 2013-03-28  6:32 UTC (permalink / raw)
  To: linux-sh

On Thu, Mar 28, 2013 at 3:18 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Magnus,
>
> On Wednesday 27 March 2013 23:30:49 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.
>>
>> [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?
>
> We've discussed that before, and I totally agree. I will submit patches to do
> so.

Thanks for your help, with those patches applied the current state is very nice.

Cheers,

/ magnus

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

end of thread, other threads:[~2013-03-28  6:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-03-28  0:57 ` Simon Horman
2013-03-28  6:32 ` Magnus Damm

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.