Skip to contentSkip to conversation

Revert "pinctrl: zynqmp: Unify pin naming"

PATCH In review Gerhard Engleder 2 participants 3 messages Jan 27, 2022 – Jan 28, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "pinctrl: zynqmp: Unify pin naming"

From: Gerhard Engleder <[email protected]>

This reverts commit 54784ff24971ed5bd3f1056edce998148709d0a7.

This patch changes the pin names from "MIO%d" to "MIO-%d", but all dts in arch/arm64/boot/dts/xilinx still use the old name. As a result my ZCU104 has no output on serial terminal and is not reachable over network.

---
 drivers/pinctrl/pinctrl-zynqmp.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/pinctrl/pinctrl-zynqmp.c +4 -6
index 42da6bd399ee..e14012209992 100644
@@ -809,7 +809,6 @@ static int zynqmp_pinctrl_prepare_pin_desc(struct device *dev,
 					   unsigned int *npins)
 {
 	struct pinctrl_pin_desc *pins, *pin;
-	char **pin_names;
 	int ret;
 	int i;
 
@@ -821,14 +820,13 @@ static int zynqmp_pinctrl_prepare_pin_desc(struct device *dev,
 	if (!pins)
 		return -ENOMEM;
 
-	pin_names = devm_kasprintf_strarray(dev, ZYNQMP_PIN_PREFIX, *npins);
-	if (IS_ERR(pin_names))
-		return PTR_ERR(pin_names);
-
 	for (i = 0; i < *npins; i++) {
 		pin = &pins[i];
 		pin->number = i;
-		pin->name = pin_names[i];
+		pin->name = devm_kasprintf(dev, GFP_KERNEL, "%s%d",
+					   ZYNQMP_PIN_PREFIX, i);
+		if (!pin->name)
+			return -ENOMEM;
 	}
 
 	*zynqmp_pins = pins;
Signature · 1 line
2.20.1
#1 lore raw
Quoted 1 line · Gerhard Engleder

From: Gerhard Engleder <[email protected]>

Thanks for your report, my comments below.

Quoted 6 lines

This reverts commit 54784ff24971ed5bd3f1056edce998148709d0a7.

This patch changes the pin names from "MIO%d" to "MIO-%d", but all dts in arch/arm64/boot/dts/xilinx still use the old name. As a result my ZCU104 has no output on serial terminal and is not reachable over network.

And question here again, is the pin names ABI or not? If it's an ABI, then it should be clarified in the documentation. Otherwise, I'm wondering how this even may break anything.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 7 lines · Andy Shevchenko
Quoted 1 line · Gerhard Engleder

From: Gerhard Engleder <[email protected]>

Thanks for your report, my comments below.

Quoted 2 lines

This reverts commit 54784ff24971ed5bd3f1056edce998148709d0a7.

Quoted 8 lines
Quoted 4 lines

This patch changes the pin names from "MIO%d" to "MIO-%d", but all dts in arch/arm64/boot/dts/xilinx still use the old name. As a result my ZCU104 has no output on serial terminal and is not reachable over network.

And question here again, is the pin names ABI or not? If it's an ABI, then it should be clarified in the documentation. Otherwise, I'm wondering how this even may break anything.

Meanwhile I apply this to my tree and send as fix PR to Linus.

Signature · 2 lines
With Best Regards,
Andy Shevchenko