All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio"
@ 2018-03-12 14:40 Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 1/6] pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS() Geert Uytterhoeven
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2018-03-12 14:40 UTC (permalink / raw)
  To: Laurent Pinchart, Linus Walleij, Sergei Shtylyov
  Cc: Niklas Söderlund, Jacopo Mondi, Yoshihiro Shimoda,
	linux-renesas-soc, linux-gpio, Geert Uytterhoeven

	Hi all,

On Renesas R-Car Gen2 SoCs, the pin group for the MDIO bus is named
"mdio".

When initial support was added for R-Car H3, the MDIO pin was forgotten,
and the MDC pin got its own group named "mdc".  During the addition of
support for R-Car M3-W, this mistake was noticed.  But as R-Car H3 and
M3-W are pin compatible, and can be mounted on the same boards, the
decision was made to just add the MDIO pin to the existing "mdc" group.
Later this was extended to R-Car H3 ES2.0, and M3-N, because of pin
compatibility, and to R-Car D3, in the name of consistency among R-Car
Gen3 SoCs.

However, this decision keeps on being questioned when adding new SoC
support.  Hence bite the bullet and admit our mistake, and rename the
pin group from "mdc" to "mdio", like on R-Car Gen2 SoCs.  Backwards
compatibility with old DTBs is retained by using a pin group alias.

This patch series:
  1. Introduces a macro for creating pin group aliases,
  2. Renames the "mdc" pin group to "mdio" on R-Car H3 (ES1.x and
     ES2.0), M3-W, M3-N, and D3.

Thanks for your comments!

Geert Uytterhoeven (6):
  pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS()
  pinctrl: sh-pfc: r8a7795: Rename EtherAVB "mdc" pin group to "mdio"
  pinctrl: sh-pfc: r8a7795-es1: Rename EtherAVB "mdc" pin group to
    "mdio"
  pinctrl: sh-pfc: r8a7796: Rename EtherAVB "mdc" pin group to "mdio"
  pinctrl: sh-pfc: r8a77965: Rename EtherAVB "mdc" pin group to "mdio"
  pinctrl: sh-pfc: r8a77995: Rename EtherAVB "mdc" pin group to "mdio"

 drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 10 ++++++----
 drivers/pinctrl/sh-pfc/pfc-r8a7795.c     | 10 ++++++----
 drivers/pinctrl/sh-pfc/pfc-r8a7796.c     | 10 ++++++----
 drivers/pinctrl/sh-pfc/pfc-r8a77965.c    | 10 ++++++----
 drivers/pinctrl/sh-pfc/pfc-r8a77995.c    | 10 ++++++----
 drivers/pinctrl/sh-pfc/sh_pfc.h          |  5 +++--
 6 files changed, 33 insertions(+), 22 deletions(-)

-- 
2.7.4

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] 8+ messages in thread

* [PATCH 1/6] pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS()
  2018-03-12 14:40 [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
@ 2018-03-12 14:40 ` Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 2/6] pinctrl: sh-pfc: r8a7795: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2018-03-12 14:40 UTC (permalink / raw)
  To: Laurent Pinchart, Linus Walleij, Sergei Shtylyov
  Cc: Niklas Söderlund, Jacopo Mondi, Yoshihiro Shimoda,
	linux-renesas-soc, linux-gpio, Geert Uytterhoeven

Add a macro to refer to another pin group with a different name.

This will be used to rename wrongly-named pin groups, while retaining
backwards compatibility with old DTBs.

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

diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
index 7253a8cbb0ead00e..d5b6e10cb9ca3328 100644
--- a/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
@@ -39,13 +39,14 @@ struct sh_pfc_pin {
 	unsigned int configs;
 };
 
-#define SH_PFC_PIN_GROUP(n)				\
+#define SH_PFC_PIN_GROUP_ALIAS(alias, n)		\
 	{						\
-		.name = #n,				\
+		.name = #alias,				\
 		.pins = n##_pins,			\
 		.mux = n##_mux,				\
 		.nr_pins = ARRAY_SIZE(n##_pins),	\
 	}
+#define SH_PFC_PIN_GROUP(n)	SH_PFC_PIN_GROUP_ALIAS(n, n)
 
 struct sh_pfc_pin_group {
 	const char *name;
-- 
2.7.4

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

* [PATCH 2/6] pinctrl: sh-pfc: r8a7795: Rename EtherAVB "mdc" pin group to "mdio"
  2018-03-12 14:40 [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 1/6] pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS() Geert Uytterhoeven
@ 2018-03-12 14:40 ` Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 3/6] pinctrl: sh-pfc: r8a7795-es1: " Geert Uytterhoeven
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2018-03-12 14:40 UTC (permalink / raw)
  To: Laurent Pinchart, Linus Walleij, Sergei Shtylyov
  Cc: Niklas Söderlund, Jacopo Mondi, Yoshihiro Shimoda,
	linux-renesas-soc, linux-gpio, Geert Uytterhoeven

On other Renesas SoCs, the pin group for the MDIO bus is named "mdio"
instead of "mdc".  Fix the inconsistency, while retaining backwards
compatibility with old DTBs using a pin group alias.

Fixes: 30c078de6f3785fe ("pinctrl: sh-pfc: r8a7795: Add EtherAVB pins, groups and function")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
index 706ffe1530875db6..ee7e38c7809762c1 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
@@ -1711,11 +1711,11 @@ static const unsigned int avb_phy_int_pins[] = {
 static const unsigned int avb_phy_int_mux[] = {
 	AVB_PHY_INT_MARK,
 };
-static const unsigned int avb_mdc_pins[] = {
+static const unsigned int avb_mdio_pins[] = {
 	/* AVB_MDC, AVB_MDIO */
 	RCAR_GP_PIN(2, 9), PIN_NUMBER('A', 9),
 };
-static const unsigned int avb_mdc_mux[] = {
+static const unsigned int avb_mdio_mux[] = {
 	AVB_MDC_MARK, AVB_MDIO_MARK,
 };
 static const unsigned int avb_mii_pins[] = {
@@ -4342,7 +4342,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(avb_link),
 	SH_PFC_PIN_GROUP(avb_magic),
 	SH_PFC_PIN_GROUP(avb_phy_int),
-	SH_PFC_PIN_GROUP(avb_mdc),
+	SH_PFC_PIN_GROUP_ALIAS(avb_mdc, avb_mdio),	/* Deprecated */
+	SH_PFC_PIN_GROUP(avb_mdio),
 	SH_PFC_PIN_GROUP(avb_mii),
 	SH_PFC_PIN_GROUP(avb_avtp_pps),
 	SH_PFC_PIN_GROUP(avb_avtp_match_a),
@@ -4692,7 +4693,8 @@ static const char * const avb_groups[] = {
 	"avb_link",
 	"avb_magic",
 	"avb_phy_int",
-	"avb_mdc",
+	"avb_mdc",	/* Deprecated, please use "avb_mdio" instead */
+	"avb_mdio",
 	"avb_mii",
 	"avb_avtp_pps",
 	"avb_avtp_match_a",
-- 
2.7.4

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

* [PATCH 3/6] pinctrl: sh-pfc: r8a7795-es1: Rename EtherAVB "mdc" pin group to "mdio"
  2018-03-12 14:40 [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 1/6] pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS() Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 2/6] pinctrl: sh-pfc: r8a7795: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
@ 2018-03-12 14:40 ` Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 4/6] pinctrl: sh-pfc: r8a7796: " Geert Uytterhoeven
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2018-03-12 14:40 UTC (permalink / raw)
  To: Laurent Pinchart, Linus Walleij, Sergei Shtylyov
  Cc: Niklas Söderlund, Jacopo Mondi, Yoshihiro Shimoda,
	linux-renesas-soc, linux-gpio, Geert Uytterhoeven

On other Renesas SoCs, the pin group for the MDIO bus is named "mdio"
instead of "mdc".  Fix the inconsistency, while retaining backwards
compatibility with old DTBs using a pin group alias.

Fixes: b25719eb938eb39a ("pinctrl: sh-pfc: r8a7795: Add group for AVB MDIO and MII pins")
Fixes: 819fd4bfcc84805c ("pinctrl: sh-pfc: r8a7795: add EtherAVB support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
index 0cf0b8512482548d..82a1c411c952a63e 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
@@ -1652,11 +1652,11 @@ static const unsigned int avb_phy_int_pins[] = {
 static const unsigned int avb_phy_int_mux[] = {
 	AVB_PHY_INT_MARK,
 };
-static const unsigned int avb_mdc_pins[] = {
+static const unsigned int avb_mdio_pins[] = {
 	/* AVB_MDC, AVB_MDIO */
 	RCAR_GP_PIN(2, 9), PIN_NUMBER('A', 9),
 };
-static const unsigned int avb_mdc_mux[] = {
+static const unsigned int avb_mdio_mux[] = {
 	AVB_MDC_MARK, AVB_MDIO_MARK,
 };
 static const unsigned int avb_mii_pins[] = {
@@ -3859,7 +3859,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(avb_link),
 	SH_PFC_PIN_GROUP(avb_magic),
 	SH_PFC_PIN_GROUP(avb_phy_int),
-	SH_PFC_PIN_GROUP(avb_mdc),
+	SH_PFC_PIN_GROUP_ALIAS(avb_mdc, avb_mdio),	/* Deprecated */
+	SH_PFC_PIN_GROUP(avb_mdio),
 	SH_PFC_PIN_GROUP(avb_mii),
 	SH_PFC_PIN_GROUP(avb_avtp_pps),
 	SH_PFC_PIN_GROUP(avb_avtp_match_a),
@@ -4178,7 +4179,8 @@ static const char * const avb_groups[] = {
 	"avb_link",
 	"avb_magic",
 	"avb_phy_int",
-	"avb_mdc",
+	"avb_mdc",	/* Deprecated, please use "avb_mdio" instead */
+	"avb_mdio",
 	"avb_mii",
 	"avb_avtp_pps",
 	"avb_avtp_match_a",
-- 
2.7.4

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

* [PATCH 4/6] pinctrl: sh-pfc: r8a7796: Rename EtherAVB "mdc" pin group to "mdio"
  2018-03-12 14:40 [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2018-03-12 14:40 ` [PATCH 3/6] pinctrl: sh-pfc: r8a7795-es1: " Geert Uytterhoeven
@ 2018-03-12 14:40 ` Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 5/6] pinctrl: sh-pfc: r8a77965: " Geert Uytterhoeven
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2018-03-12 14:40 UTC (permalink / raw)
  To: Laurent Pinchart, Linus Walleij, Sergei Shtylyov
  Cc: Niklas Söderlund, Jacopo Mondi, Yoshihiro Shimoda,
	linux-renesas-soc, linux-gpio, Geert Uytterhoeven

On other Renesas SoCs, the pin group for the MDIO bus is named "mdio"
instead of "mdc".  Fix the inconsistency, while retaining backwards
compatibility with old DTBs using a pin group alias.

Fixes: 41397032c4a17dff ("pinctrl: sh-pfc: r8a7796: Add group for AVB MDIO and MII pins")
Fixes: 9c99a63ec74f34f7 ("pinctrl: sh-pfc: r8a7796: Add EtherAVB pins, groups and functions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
index e6fff5518a97bf6d..d502b0cafeb015eb 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7796.c
@@ -1717,11 +1717,11 @@ static const unsigned int avb_phy_int_pins[] = {
 static const unsigned int avb_phy_int_mux[] = {
 	AVB_PHY_INT_MARK,
 };
-static const unsigned int avb_mdc_pins[] = {
+static const unsigned int avb_mdio_pins[] = {
 	/* AVB_MDC, AVB_MDIO */
 	RCAR_GP_PIN(2, 9), PIN_NUMBER('A', 9),
 };
-static const unsigned int avb_mdc_mux[] = {
+static const unsigned int avb_mdio_mux[] = {
 	AVB_MDC_MARK, AVB_MDIO_MARK,
 };
 static const unsigned int avb_mii_pins[] = {
@@ -4311,7 +4311,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(avb_link),
 	SH_PFC_PIN_GROUP(avb_magic),
 	SH_PFC_PIN_GROUP(avb_phy_int),
-	SH_PFC_PIN_GROUP(avb_mdc),
+	SH_PFC_PIN_GROUP_ALIAS(avb_mdc, avb_mdio),	/* Deprecated */
+	SH_PFC_PIN_GROUP(avb_mdio),
 	SH_PFC_PIN_GROUP(avb_mii),
 	SH_PFC_PIN_GROUP(avb_avtp_pps),
 	SH_PFC_PIN_GROUP(avb_avtp_match_a),
@@ -4656,7 +4657,8 @@ static const char * const avb_groups[] = {
 	"avb_link",
 	"avb_magic",
 	"avb_phy_int",
-	"avb_mdc",
+	"avb_mdc",	/* Deprecated, please use "avb_mdio" instead */
+	"avb_mdio",
 	"avb_mii",
 	"avb_avtp_pps",
 	"avb_avtp_match_a",
-- 
2.7.4

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

* [PATCH 5/6] pinctrl: sh-pfc: r8a77965: Rename EtherAVB "mdc" pin group to "mdio"
  2018-03-12 14:40 [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2018-03-12 14:40 ` [PATCH 4/6] pinctrl: sh-pfc: r8a7796: " Geert Uytterhoeven
@ 2018-03-12 14:40 ` Geert Uytterhoeven
  2018-03-12 14:40 ` [PATCH 6/6] pinctrl: sh-pfc: r8a77995: " Geert Uytterhoeven
  2018-03-16  0:16 ` [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: " Niklas Söderlund
  6 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2018-03-12 14:40 UTC (permalink / raw)
  To: Laurent Pinchart, Linus Walleij, Sergei Shtylyov
  Cc: Niklas Söderlund, Jacopo Mondi, Yoshihiro Shimoda,
	linux-renesas-soc, linux-gpio, Geert Uytterhoeven

On other Renesas SoCs, the pin group for the MDIO bus is named "mdio"
instead of "mdc".  Fix the inconsistency, while retaining backwards
compatibility with old DTBs using a pin group alias.

Fixes: fa3e8b71b955af86 ("pinctrl: sh-pfc: r8a77965: Add EtherAVB groups/functions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c
index 363ccc3b1bdc7a88..d403764798d46103 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a77965.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a77965.c
@@ -1597,11 +1597,11 @@ static const unsigned int avb_phy_int_pins[] = {
 static const unsigned int avb_phy_int_mux[] = {
 	AVB_PHY_INT_MARK,
 };
-static const unsigned int avb_mdc_pins[] = {
+static const unsigned int avb_mdio_pins[] = {
 	/* AVB_MDC, AVB_MDIO */
 	RCAR_GP_PIN(2, 9), PIN_NUMBER('A', 9),
 };
-static const unsigned int avb_mdc_mux[] = {
+static const unsigned int avb_mdio_mux[] = {
 	AVB_MDC_MARK, AVB_MDIO_MARK,
 };
 static const unsigned int avb_mii_pins[] = {
@@ -1921,7 +1921,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(avb_link),
 	SH_PFC_PIN_GROUP(avb_magic),
 	SH_PFC_PIN_GROUP(avb_phy_int),
-	SH_PFC_PIN_GROUP(avb_mdc),
+	SH_PFC_PIN_GROUP_ALIAS(avb_mdc, avb_mdio),	/* Deprecated */
+	SH_PFC_PIN_GROUP(avb_mdio),
 	SH_PFC_PIN_GROUP(avb_mii),
 	SH_PFC_PIN_GROUP(avb_avtp_pps),
 	SH_PFC_PIN_GROUP(avb_avtp_match_a),
@@ -1969,7 +1970,8 @@ static const char * const avb_groups[] = {
 	"avb_link",
 	"avb_magic",
 	"avb_phy_int",
-	"avb_mdc",
+	"avb_mdc",	/* Deprecated, please use "avb_mdio" instead */
+	"avb_mdio",
 	"avb_mii",
 	"avb_avtp_pps",
 	"avb_avtp_match_a",
-- 
2.7.4

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

* [PATCH 6/6] pinctrl: sh-pfc: r8a77995: Rename EtherAVB "mdc" pin group to "mdio"
  2018-03-12 14:40 [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
                   ` (4 preceding siblings ...)
  2018-03-12 14:40 ` [PATCH 5/6] pinctrl: sh-pfc: r8a77965: " Geert Uytterhoeven
@ 2018-03-12 14:40 ` Geert Uytterhoeven
  2018-03-16  0:16 ` [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: " Niklas Söderlund
  6 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2018-03-12 14:40 UTC (permalink / raw)
  To: Laurent Pinchart, Linus Walleij, Sergei Shtylyov
  Cc: Niklas Söderlund, Jacopo Mondi, Yoshihiro Shimoda,
	linux-renesas-soc, linux-gpio, Geert Uytterhoeven

On other Renesas SoCs, the pin group for the MDIO bus is named "mdio"
instead of "mdc".  Fix the inconsistency, while retaining backwards
compatibility with old DTBs using a pin group alias.

Fixes: 66abd968d0ef3eb1 ("pinctrl: sh-pfc: r8a77995: Add EthernetAVB pins, groups and functions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c
index 27b9417be59b0b0b..cc80dbe1841daca9 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a77995.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a77995.c
@@ -988,11 +988,11 @@ static const unsigned int avb0_phy_int_pins[] = {
 static const unsigned int avb0_phy_int_mux[] = {
 	AVB0_PHY_INT_MARK,
 };
-static const unsigned int avb0_mdc_pins[] = {
+static const unsigned int avb0_mdio_pins[] = {
 	/* AVB0_MDC, AVB0_MDIO */
 	RCAR_GP_PIN(5, 17), RCAR_GP_PIN(5, 16),
 };
-static const unsigned int avb0_mdc_mux[] = {
+static const unsigned int avb0_mdio_mux[] = {
 	AVB0_MDC_MARK, AVB0_MDIO_MARK,
 };
 static const unsigned int avb0_mii_pins[] = {
@@ -1800,7 +1800,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
 	SH_PFC_PIN_GROUP(avb0_link),
 	SH_PFC_PIN_GROUP(avb0_magic),
 	SH_PFC_PIN_GROUP(avb0_phy_int),
-	SH_PFC_PIN_GROUP(avb0_mdc),
+	SH_PFC_PIN_GROUP_ALIAS(avb0_mdc, avb0_mdio),	/* Deprecated */
+	SH_PFC_PIN_GROUP(avb0_mdio),
 	SH_PFC_PIN_GROUP(avb0_mii),
 	SH_PFC_PIN_GROUP(avb0_avtp_pps_a),
 	SH_PFC_PIN_GROUP(avb0_avtp_match_a),
@@ -1901,7 +1902,8 @@ static const char * const avb0_groups[] = {
 	"avb0_link",
 	"avb0_magic",
 	"avb0_phy_int",
-	"avb0_mdc",
+	"avb0_mdc",	/* Deprecated, please use "avb0_mdio" instead */
+	"avb0_mdio",
 	"avb0_mii",
 	"avb0_avtp_pps_a",
 	"avb0_avtp_match_a",
-- 
2.7.4

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

* Re: [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio"
  2018-03-12 14:40 [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
                   ` (5 preceding siblings ...)
  2018-03-12 14:40 ` [PATCH 6/6] pinctrl: sh-pfc: r8a77995: " Geert Uytterhoeven
@ 2018-03-16  0:16 ` Niklas Söderlund
  6 siblings, 0 replies; 8+ messages in thread
From: Niklas Söderlund @ 2018-03-16  0:16 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Laurent Pinchart, Linus Walleij, Sergei Shtylyov, Jacopo Mondi,
	Yoshihiro Shimoda, linux-renesas-soc, linux-gpio

Hi Geert,

Thanks for your work.

On 2018-03-12 15:40:16 +0100, Geert Uytterhoeven wrote:
> 	Hi all,
> 
> On Renesas R-Car Gen2 SoCs, the pin group for the MDIO bus is named
> "mdio".
> 
> When initial support was added for R-Car H3, the MDIO pin was forgotten,
> and the MDC pin got its own group named "mdc".  During the addition of
> support for R-Car M3-W, this mistake was noticed.  But as R-Car H3 and
> M3-W are pin compatible, and can be mounted on the same boards, the
> decision was made to just add the MDIO pin to the existing "mdc" group.
> Later this was extended to R-Car H3 ES2.0, and M3-N, because of pin
> compatibility, and to R-Car D3, in the name of consistency among R-Car
> Gen3 SoCs.
> 
> However, this decision keeps on being questioned when adding new SoC
> support.  Hence bite the bullet and admit our mistake, and rename the
> pin group from "mdc" to "mdio", like on R-Car Gen2 SoCs.  Backwards
> compatibility with old DTBs is retained by using a pin group alias.

Thanks for fixing this, it frustrated me in the past :-) i like the pin 
alias solution neat! For the whole series,

Reviewed-by: Niklas S�derlund <niklas.soderlund+renesas@ragnatech.se>

> 
> This patch series:
>   1. Introduces a macro for creating pin group aliases,
>   2. Renames the "mdc" pin group to "mdio" on R-Car H3 (ES1.x and
>      ES2.0), M3-W, M3-N, and D3.
> 
> Thanks for your comments!
> 
> Geert Uytterhoeven (6):
>   pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS()
>   pinctrl: sh-pfc: r8a7795: Rename EtherAVB "mdc" pin group to "mdio"
>   pinctrl: sh-pfc: r8a7795-es1: Rename EtherAVB "mdc" pin group to
>     "mdio"
>   pinctrl: sh-pfc: r8a7796: Rename EtherAVB "mdc" pin group to "mdio"
>   pinctrl: sh-pfc: r8a77965: Rename EtherAVB "mdc" pin group to "mdio"
>   pinctrl: sh-pfc: r8a77995: Rename EtherAVB "mdc" pin group to "mdio"
> 
>  drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 10 ++++++----
>  drivers/pinctrl/sh-pfc/pfc-r8a7795.c     | 10 ++++++----
>  drivers/pinctrl/sh-pfc/pfc-r8a7796.c     | 10 ++++++----
>  drivers/pinctrl/sh-pfc/pfc-r8a77965.c    | 10 ++++++----
>  drivers/pinctrl/sh-pfc/pfc-r8a77995.c    | 10 ++++++----
>  drivers/pinctrl/sh-pfc/sh_pfc.h          |  5 +++--
>  6 files changed, 33 insertions(+), 22 deletions(-)
> 
> -- 
> 2.7.4
> 
> 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

-- 
Regards,
Niklas S�derlund

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

end of thread, other threads:[~2018-03-16  0:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 14:40 [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
2018-03-12 14:40 ` [PATCH 1/6] pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS() Geert Uytterhoeven
2018-03-12 14:40 ` [PATCH 2/6] pinctrl: sh-pfc: r8a7795: Rename EtherAVB "mdc" pin group to "mdio" Geert Uytterhoeven
2018-03-12 14:40 ` [PATCH 3/6] pinctrl: sh-pfc: r8a7795-es1: " Geert Uytterhoeven
2018-03-12 14:40 ` [PATCH 4/6] pinctrl: sh-pfc: r8a7796: " Geert Uytterhoeven
2018-03-12 14:40 ` [PATCH 5/6] pinctrl: sh-pfc: r8a77965: " Geert Uytterhoeven
2018-03-12 14:40 ` [PATCH 6/6] pinctrl: sh-pfc: r8a77995: " Geert Uytterhoeven
2018-03-16  0:16 ` [PATCH 0/6] pinctrl: sh-pfc: rcar-gen3: " Niklas Söderlund

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.