Skip to contentSkip to conversation

ARM: dts: aspeed: Add gpio-keys-polled for fan presence

PATCH Superseded Christopher Bostic 1 participant 1 message Jul 19, 2017

Subsystems (2)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: dts: aspeed: Add gpio-keys-polled for fan presence

Define gpio-keys-polled. Add pca-955x chip IO as GPIO source.

---
v3 - Remove 'autorepeat'
- Increase polling period to 1 second
- Remove GPIO specifiers from pca955x in dev tree
v2 - Change 'linux,code' from a unique global value to a local one
for all the gpio-keys-polled devices.

---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 31 ++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +31 -0
index 34c5dfc..b18e747 100644
@@ -62,6 +62,37 @@
 		};
 	};
 
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		#poll-interval = <1000>;
+
+		fan0-presence {
+			label = "fan0-presence";
+			gpios = <&pca0 4 GPIO_ACTIVE_LOW>;
+			linux,code = <4>;
+		};
+
+		fan1-presence {
+			label = "fan1-presence";
+			gpios = <&pca0 5 GPIO_ACTIVE_LOW>;
+			linux,code = <5>;
+		};
+
+		fan2-presence {
+			label = "fan2-presence";
+			gpios = <&pca0 6 GPIO_ACTIVE_LOW>;
+			linux,code = <6>;
+		};
+
+		fan3-presence {
+			label = "fan3-presence";
+			gpios = <&pca0 7 GPIO_ACTIVE_LOW>;
+			linux,code = <7>;
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
Signature · 1 line
1.8.2.2