linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro
@ 2019-05-10 12:10 Geert Uytterhoeven
  2019-05-10 12:10 ` [PATCH 1/2] pinctrl: sh-pfc: Add PORT_GP_27 helper macro Geert Uytterhoeven
  2019-05-10 12:10 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro Geert Uytterhoeven
  0 siblings, 2 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2019-05-10 12:10 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-renesas-soc, linux-gpio, Geert Uytterhoeven

	Hi Linus,

This is a small cleanup for the R-Car M1A pin control driver, replacing
custom by common code.

To be queued in sh-pfc-for-v5.3.

Geert Uytterhoeven (2):
  pinctrl: sh-pfc: Add PORT_GP_27 helper macro
  pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro

 drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 18 +-----------------
 drivers/pinctrl/sh-pfc/sh_pfc.h      |  8 ++++++--
 2 files changed, 7 insertions(+), 19 deletions(-)

-- 
2.17.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* [PATCH 1/2] pinctrl: sh-pfc: Add PORT_GP_27 helper macro
  2019-05-10 12:10 [PATCH 0/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro Geert Uytterhoeven
@ 2019-05-10 12:10 ` Geert Uytterhoeven
  2019-05-13 12:21   ` Simon Horman
  2019-05-10 12:10 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro Geert Uytterhoeven
  1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2019-05-10 12:10 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-renesas-soc, linux-gpio, Geert Uytterhoeven

This follows the style of the existing PORT_GP_X macros, and will be
used by a follow-up patch for the r8a7778 SoC.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pinctrl/sh-pfc/sh_pfc.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
index d1b61066ee88c6fd..305a8db70ca86334 100644
--- a/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
@@ -546,9 +546,13 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;
 	PORT_GP_CFG_1(bank, 25, fn, sfx, cfg)
 #define PORT_GP_26(bank, fn, sfx)	PORT_GP_CFG_26(bank, fn, sfx, 0)
 
-#define PORT_GP_CFG_28(bank, fn, sfx, cfg)				\
+#define PORT_GP_CFG_27(bank, fn, sfx, cfg)				\
 	PORT_GP_CFG_26(bank, fn, sfx, cfg),				\
-	PORT_GP_CFG_1(bank, 26, fn, sfx, cfg),				\
+	PORT_GP_CFG_1(bank, 26, fn, sfx, cfg)
+#define PORT_GP_27(bank, fn, sfx)	PORT_GP_CFG_27(bank, fn, sfx, 0)
+
+#define PORT_GP_CFG_28(bank, fn, sfx, cfg)				\
+	PORT_GP_CFG_27(bank, fn, sfx, cfg),				\
 	PORT_GP_CFG_1(bank, 27, fn, sfx, cfg)
 #define PORT_GP_28(bank, fn, sfx)	PORT_GP_CFG_28(bank, fn, sfx, 0)
 
-- 
2.17.1


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

* [PATCH 2/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro
  2019-05-10 12:10 [PATCH 0/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro Geert Uytterhoeven
  2019-05-10 12:10 ` [PATCH 1/2] pinctrl: sh-pfc: Add PORT_GP_27 helper macro Geert Uytterhoeven
@ 2019-05-10 12:10 ` Geert Uytterhoeven
  2019-05-13 12:22   ` Simon Horman
  1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2019-05-10 12:10 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-renesas-soc, linux-gpio, Geert Uytterhoeven

Get rid of the custom PORT_GP_PUP_27() macro by using the common
PORT_GP_CFG_27() macro instead.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
No change in generated code.
---
 drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7778.c b/drivers/pinctrl/sh-pfc/pfc-r8a7778.c
index 985e8c215c6dee48..564b219942aac34c 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7778.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7778.c
@@ -22,28 +22,12 @@
 #define PORT_GP_PUP_1(bank, pin, fn, sfx)	\
 	PORT_GP_CFG_1(bank, pin, fn, sfx, SH_PFC_PIN_CFG_PULL_UP)
 
-#define PORT_GP_PUP_27(bank, fn, sfx)					\
-	PORT_GP_PUP_1(bank, 0,  fn, sfx), PORT_GP_PUP_1(bank, 1,  fn, sfx),	\
-	PORT_GP_PUP_1(bank, 2,  fn, sfx), PORT_GP_PUP_1(bank, 3,  fn, sfx),	\
-	PORT_GP_PUP_1(bank, 4,  fn, sfx), PORT_GP_PUP_1(bank, 5,  fn, sfx),	\
-	PORT_GP_PUP_1(bank, 6,  fn, sfx), PORT_GP_PUP_1(bank, 7,  fn, sfx),	\
-	PORT_GP_PUP_1(bank, 8,  fn, sfx), PORT_GP_PUP_1(bank, 9,  fn, sfx),	\
-	PORT_GP_PUP_1(bank, 10, fn, sfx), PORT_GP_PUP_1(bank, 11, fn, sfx),	\
-	PORT_GP_PUP_1(bank, 12, fn, sfx), PORT_GP_PUP_1(bank, 13, fn, sfx),	\
-	PORT_GP_PUP_1(bank, 14, fn, sfx), PORT_GP_PUP_1(bank, 15, fn, sfx),	\
-	PORT_GP_PUP_1(bank, 16, fn, sfx), PORT_GP_PUP_1(bank, 17, fn, sfx),	\
-	PORT_GP_PUP_1(bank, 18, fn, sfx), PORT_GP_PUP_1(bank, 19, fn, sfx),	\
-	PORT_GP_PUP_1(bank, 20, fn, sfx), PORT_GP_PUP_1(bank, 21, fn, sfx),	\
-	PORT_GP_PUP_1(bank, 22, fn, sfx), PORT_GP_PUP_1(bank, 23, fn, sfx),	\
-	PORT_GP_PUP_1(bank, 24, fn, sfx), PORT_GP_PUP_1(bank, 25, fn, sfx),	\
-	PORT_GP_PUP_1(bank, 26, fn, sfx)
-
 #define CPU_ALL_GP(fn, sfx)		\
 	PORT_GP_CFG_32(0, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),		\
 	PORT_GP_CFG_32(1, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),		\
 	PORT_GP_CFG_32(2, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),		\
 	PORT_GP_CFG_32(3, fn, sfx, SH_PFC_PIN_CFG_PULL_UP),		\
-	PORT_GP_PUP_27(4, fn, sfx)
+	PORT_GP_CFG_27(4, fn, sfx, SH_PFC_PIN_CFG_PULL_UP)
 
 enum {
 	PINMUX_RESERVED = 0,
-- 
2.17.1


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

* Re: [PATCH 1/2] pinctrl: sh-pfc: Add PORT_GP_27 helper macro
  2019-05-10 12:10 ` [PATCH 1/2] pinctrl: sh-pfc: Add PORT_GP_27 helper macro Geert Uytterhoeven
@ 2019-05-13 12:21   ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2019-05-13 12:21 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linus Walleij, linux-renesas-soc, linux-gpio

On Fri, May 10, 2019 at 02:10:22PM +0200, Geert Uytterhoeven wrote:
> This follows the style of the existing PORT_GP_X macros, and will be
> used by a follow-up patch for the r8a7778 SoC.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH 2/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro
  2019-05-10 12:10 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro Geert Uytterhoeven
@ 2019-05-13 12:22   ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2019-05-13 12:22 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linus Walleij, linux-renesas-soc, linux-gpio

On Fri, May 10, 2019 at 02:10:23PM +0200, Geert Uytterhoeven wrote:
> Get rid of the custom PORT_GP_PUP_27() macro by using the common
> PORT_GP_CFG_27() macro instead.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

end of thread, other threads:[~2019-05-13 12:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-10 12:10 [PATCH 0/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro Geert Uytterhoeven
2019-05-10 12:10 ` [PATCH 1/2] pinctrl: sh-pfc: Add PORT_GP_27 helper macro Geert Uytterhoeven
2019-05-13 12:21   ` Simon Horman
2019-05-10 12:10 ` [PATCH 2/2] pinctrl: sh-pfc: r8a7778: Use common PORT_GP_CFG_27() macro Geert Uytterhoeven
2019-05-13 12:22   ` Simon Horman

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