Skip to contentSkip to conversation

ARM: dts: aspeed: witherspoon: Add gpio line names

PATCH Superseded Andrew Geissler 2 participants 3 messages Feb 5, 2020 – Feb 6, 2020

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: aspeed: witherspoon: Add gpio line names

From: Andrew Geissler <[email protected]>

Name the gpios so libgiod will work with them

---
v2: added upstream to patch
prepended fsi- on fsi related gpios
prepended led- on led related gpios
prepended presence on presence related gpios
dropped pin_gpio_a1 definition

---
 .../boot/dts/aspeed-bmc-opp-witherspoon.dts   | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +36 -0
index 515f0f208ee6..2519722928a4 100644
@@ -193,6 +193,42 @@
 
 };
 
+&gpio {
+    status = "okay";
+	gpio-line-names =
+	/*A0-A7*/	"","cfam-reset","","","","","fsi-mux","",
+	/*B0-B7*/	"","","","","","air-water","","",
+	/*C0-C7*/	"","","","","","","","",
+	/*D0-D7*/	"fsi-enable","","","","","","","",
+	/*E0-E7*/	"fsi-data","","","","","","","",
+	/*F0-F7*/	"","","","","","","","",
+	/*G0-G7*/	"","","","","","","","",
+	/*H0-H7*/	"","","","","","","","",
+	/*I0-I7*/	"","","","","","","","",
+	/*J0-J7*/	"","","checkstop","","","","","",
+	/*K0-K7*/	"","","","","","","","",
+	/*L0-L7*/	"","","","","","","","",
+	/*M0-M7*/	"","","","","","","","",
+	/*N0-N7*/	"presence-ps1","","led-rear-fault","led-rear-power",
+		        "led-rear-id","","","",
+	/*O0-O7*/	"","","","","","","","",
+	/*P0-P7*/	"","","","","","","","presence-ps0",
+	/*Q0-Q7*/	"","","","","","","","",
+	/*R0-R7*/	"","","fsi-trans","","","power-button","","",
+	/*S0-S7*/	"","","","","","","","",
+	/*T0-T7*/	"","","","","","","","",
+	/*U0-U7*/	"","","","","","","","",
+	/*V0-V7*/	"","","","","","","","",
+	/*W0-W7*/	"","","","","","","","",
+	/*X0-X7*/	"","","","","","","","",
+	/*Y0-Y7*/	"","","","","","","","",
+	/*Z0-Z7*/	"","","","","","","","",
+	/*AA0-AA7*/	"fsi-clock","","","","","","","",
+	/*AB0-AB7*/	"","","","","","","","",
+	/*AC0-AC7*/	"","","","","","","","";
+
+};
+
 &fmc {
 	status = "okay";
 
Signature · 1 line
2.21.0 (Apple Git-122)
maintainer
#1 lore raw
Quoted 4 lines · Andrew Geissler

From: Andrew Geissler <[email protected]>

Name the gpios so libgiod will work with them

Perhaps: "Name the GPIOs to help userspace work with them."

You could also mention that the names are describe the functionality that the lines provide, and not a net or ball name.

A heads up: when you send patches upstream to the kernel mailing list, we don't include the "linux dev-X.y" stuff in the subject.

Quoted 16 lines

---
v2: added upstream to patch
prepended fsi- on fsi related gpios
prepended led- on led related gpios
prepended presence on presence related gpios
dropped pin_gpio_a1 definition

---
 .../boot/dts/aspeed-bmc-opp-witherspoon.dts   | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0 -0
index 515f0f208ee6..2519722928a4 100644

arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 197

Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +2 -0
@@ -193,6 +193,42 @@
 
 };
 
+&gpio {
+    status = "okay";

The status=okay is harmless but redundant, as this node is already enabled.

Quoted 22 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +22 -0
+       gpio-line-names =
+       /*A0-A7*/       "","cfam-reset","","","","","fsi-mux","",
+       /*B0-B7*/       "","","","","","air-water","","",
+       /*C0-C7*/       "","","","","","","","",
+       /*D0-D7*/       "fsi-enable","","","","","","","",
+       /*E0-E7*/       "fsi-data","","","","","","","",
+       /*F0-F7*/       "","","","","","","","",
+       /*G0-G7*/       "","","","","","","","",
+       /*H0-H7*/       "","","","","","","","",
+       /*I0-I7*/       "","","","","","","","",
+       /*J0-J7*/       "","","checkstop","","","","","",
+       /*K0-K7*/       "","","","","","","","",
+       /*L0-L7*/       "","","","","","","","",
+       /*M0-M7*/       "","","","","","","","",
+       /*N0-N7*/       "presence-ps1","","led-rear-fault","led-rear-power",
+                       "led-rear-id","","","",
+       /*O0-O7*/       "","","","","","","","",
+       /*P0-P7*/       "","","","","","","","presence-ps0",
+       /*Q0-Q7*/       "","","","","","","","",
+       /*R0-R7*/       "","","fsi-trans","","","power-button","","",
+       /*S0-S7*/       "","","","","","","","",
+       /*T0-T7*/       "","","","","","","","",

arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 229

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +10 -0
+       /*U0-U7*/       "","","","","","","","",
+       /*V0-V7*/       "","","","","","","","",
+       /*W0-W7*/       "","","","","","","","",
+       /*X0-X7*/       "","","","","","","","",
+       /*Y0-Y7*/       "","","","","","","","",
+       /*Z0-Z7*/       "","","","","","","","",
+       /*AA0-AA7*/     "fsi-clock","","","","","","","",
+       /*AB0-AB7*/     "","","","","","","","",
+       /*AC0-AC7*/     "","","","","","","","";
+

Cean up the line of whitespace here.

Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +2 -1
+};
+
 &fmc {
        status = "okay";
 
--

2.21.0 (Apple Git-122)

#2 lore raw

PATCH v2 1/1 ARM: dts: aspeed: witherspoon: Add gpio line names

Quoted 11 lines · Joel Stanley
Quoted 4 lines · On Wed, 5 Feb 2020 at 21:55, Andrew Geissler <[email protected]…

From: Andrew Geissler <[email protected] <mailto:[email protected]>>

Name the gpios so libgiod will work with them

Perhaps: "Name the GPIOs to help userspace work with them."

ack

Quoted 3 lines

You could also mention that the names are describe the functionality that the lines provide, and not a net or ball name.

ack

Quoted 3 lines

A heads up: when you send patches upstream to the kernel mailing list, we don't include the "linux dev-X.y" stuff in the subject.

thanks, will fix in next patch

Quoted 18 lines
Quoted 18 lines

---
v2: added upstream to patch
prepended fsi- on fsi related gpios
prepended led- on led related gpios
prepended presence on presence related gpios
dropped pin_gpio_a1 definition
---
.../boot/dts/aspeed-bmc-opp-witherspoon.dts | 36 +++++++++++++++++++

1 file changed, 36 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0 -0
index 515f0f208ee6..2519722928a4 100644
@@ -193,6 +193,42 @@
 
Quoted 6 lines

arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 197

Quoted 4 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +2 -0
 };
 
+&gpio {
+    status = "okay";

The status=okay is harmless but redundant, as this node is already enabled.

ack

Quoted 34 lines
Quoted 23 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +22 -0
+       gpio-line-names =
+       /*A0-A7*/       "","cfam-reset","","","","","fsi-mux","",
+       /*B0-B7*/       "","","","","","air-water","","",
+       /*C0-C7*/       "","","","","","","","",
+       /*D0-D7*/       "fsi-enable","","","","","","","",
+       /*E0-E7*/       "fsi-data","","","","","","","",
+       /*F0-F7*/       "","","","","","","","",
+       /*G0-G7*/       "","","","","","","","",
+       /*H0-H7*/       "","","","","","","","",
+       /*I0-I7*/       "","","","","","","","",
+       /*J0-J7*/       "","","checkstop","","","","","",
+       /*K0-K7*/       "","","","","","","","",
+       /*L0-L7*/       "","","","","","","","",
+       /*M0-M7*/       "","","","","","","","",
+       /*N0-N7*/       "presence-ps1","","led-rear-fault","led-rear-power",
+                       "led-rear-id","","","",
+       /*O0-O7*/       "","","","","","","","",
+       /*P0-P7*/       "","","","","","","","presence-ps0",
+       /*Q0-Q7*/       "","","","","","","","",
+       /*R0-R7*/       "","","fsi-trans","","","power-button","","",
+       /*S0-S7*/       "","","","","","","","",
+       /*T0-T7*/       "","","","","","","","",

arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts line 229

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +10 -0
+       /*U0-U7*/       "","","","","","","","",
+       /*V0-V7*/       "","","","","","","","",
+       /*W0-W7*/       "","","","","","","","",
+       /*X0-X7*/       "","","","","","","","",
+       /*Y0-Y7*/       "","","","","","","","",
+       /*Z0-Z7*/       "","","","","","","","",
+       /*AA0-AA7*/     "fsi-clock","","","","","","","",
+       /*AB0-AB7*/     "","","","","","","","",
+       /*AC0-AC7*/     "","","","","","","","";
+
Quoted 1 line

Cean up the line of whitespace here.

ack

Quoted 8 lines
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +2 -1
+};
+
 &fmc {
       status = "okay";
 
--

2.21.0 (Apple Git-122)