[PATCH v2 1/2] ARM: dts: aspeed: Add gpio-keys-polled for fan presence

Christopher Bostic cbostic at linux.vnet.ibm.com
Wed Jul 19 06:43:23 AEST 2017


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

Signed-off-by: Christopher Bostic <cbostic at linux.vnet.ibm.com>
---
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 | 34 ++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index 34c5dfc..f574d7b3 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -62,6 +62,38 @@
 		};
 	};
 
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		#poll-interval = <100>;
+		autorepeat;
+
+		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";
 
@@ -224,6 +256,8 @@
 		reg = <0x60>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+		gpio-controller;
+		#gpio-cells = <2>;
 
 		fan0: led at 0 {
 			label = "fan0";
-- 
1.8.2.2



More information about the openbmc mailing list