Skip to contentSkip to conversation

enable gpio-keys

PATCH Applied Brad Bishop 3 participants 7 messages Apr 21, 2017

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

v5 cover enable gpio-keys

v5:
Revert back to a single device.
v4:
Describe GPIO function in device path.
v3:
Drop phandle and flags from linux,code.
Assign gpios to their own evdev.
v2:
Use gpio numbers for keycodes.

Brad Bishop (2):
ARM: configs: aspeed: Enable keyboard-gpio
ARM: dts: Enable checkstop and cooling gpio keys

 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++++++++++++++
 arch/arm/configs/aspeed_g4_defconfig             |  8 +++++++-
 arch/arm/configs/aspeed_g5_defconfig             |  8 +++++++-
 3 files changed, 30 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH v5 1/2 ARM: configs: aspeed: Enable keyboard-gpio

Some OpenBMC systems will be using keyboard-gpio so enable it in our configs.

---
 arch/arm/configs/aspeed_g4_defconfig | 8 +++++++-
 arch/arm/configs/aspeed_g5_defconfig | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)
arch/arm/configs/aspeed_g4_defconfig +7 -1
index 552297b..4350f67 100644
@@ -103,7 +103,12 @@ CONFIG_FTGMAC100=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -138,6 +143,7 @@ CONFIG_SENSORS_ADM1275=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
arch/arm/configs/aspeed_g5_defconfig +7 -1
index c5e7295..b6b3ca0 100644
@@ -102,7 +102,12 @@ CONFIG_FTGMAC100=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -135,6 +140,7 @@ CONFIG_PMBUS=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
Signature · 1 line
1.8.3.1
Acked-by on v5 1/2
#2 lore raw

Re: [PATCH linux dev-4.7 v5 1/2] ARM: configs: aspeed: Enable keyboard-gpio

Quoted 4 lines · Brad Bishop

Some OpenBMC systems will be using keyboard-gpio so enable it in our configs.

In the future please add the tags given for previous patch revisions if there hasn't been significant change :)

Quoted 57 lines

---
 arch/arm/configs/aspeed_g4_defconfig | 8 +++++++- arch/arm/configs/aspeed_g5_defconfig | 8 +++++++-

 2 files changed, 14 insertions(+), 2 deletions(-)
arch/arm/configs/aspeed_g4_defconfig +0 -0
index 552297b..4350f67 100644
@@ -103,7 +103,12 @@ CONFIG_FTGMAC100=y

 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set

arch/arm/configs/aspeed_g4_defconfig +6 -1
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set

 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set

arch/arm/configs/aspeed_g4_defconfig +0 -0
@@ -138,6 +143,7 @@ CONFIG_SENSORS_ADM1275=y

 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y

arch/arm/configs/aspeed_g5_defconfig +0 -0
index c5e7295..b6b3ca0 100644
@@ -102,7 +102,12 @@ CONFIG_FTGMAC100=y

 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set

arch/arm/configs/aspeed_g5_defconfig +6 -1
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set

 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set

arch/arm/configs/aspeed_g5_defconfig +0 -0
@@ -135,6 +140,7 @@ CONFIG_PMBUS=y

 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y

maintainer Applied
#3 lore raw

Re: [PATCH linux dev-4.7 v5 1/2] ARM: configs: aspeed: Enable keyboard-gpio

Quoted 7 lines · Andrew Jeffery
Quoted 4 lines · Brad Bishop

Some OpenBMC systems will be using keyboard-gpio so enable it in our configs.

Merged to dev-4.7.

Cheers,

Joel

Quoted 61 lines

In the future please add the tags given for previous patch revisions if there hasn't been significant change :)

Quoted 57 lines
---
 arch/arm/configs/aspeed_g4_defconfig | 8 +++++++-
 arch/arm/configs/aspeed_g5_defconfig | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)
arch/arm/configs/aspeed_g4_defconfig +7 -1
index 552297b..4350f67 100644
@@ -103,7 +103,12 @@ CONFIG_FTGMAC100=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -138,6 +143,7 @@ CONFIG_SENSORS_ADM1275=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
arch/arm/configs/aspeed_g5_defconfig +7 -1
index c5e7295..b6b3ca0 100644
@@ -102,7 +102,12 @@ CONFIG_FTGMAC100=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_REALTEK_PHY=y
 # CONFIG_WLAN is not set
-# CONFIG_INPUT is not set
+# CONFIG_INPUT_LEDS is not set
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
 # CONFIG_LEGACY_PTYS is not set
@@ -135,6 +140,7 @@ CONFIG_PMBUS=y
 CONFIG_SENSORS_LM25066=y
 CONFIG_SENSORS_UCD9000=y
 CONFIG_SENSORS_TMP421=y
+# CONFIG_HID is not set
 # CONFIG_USB_SUPPORT is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
#4 lore raw

PATCH v5 2/2 ARM: dts: Enable checkstop and cooling gpio keys

In reply to Brad Bishop

Enable gpio-keys events for the checkstop and water/air cooled gpios for use by applications on the Witherspoon system.

---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +16 -0
index e3a7b77..236696a 100644
@@ -31,6 +31,22 @@
 		};
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		air-water {
+			label = "air-water";
+			gpios = <&gpio ASPEED_GPIO(B, 5) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(B, 5)>;
+		};
+
+		checkstop {
+			label = "checkstop";
+			gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(J, 2)>;
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
Signature · 1 line
1.8.3.1
Acked-by on v5 2/2
#5 lore raw

Re: [PATCH linux dev-4.7 v5 2/2] ARM: dts: Enable checkstop and cooling gpio keys

Quoted 4 lines · Brad Bishop

Enable gpio-keys events for the checkstop and water/air cooled gpios for use by applications on the Witherspoon system.

Flip flop ;)

Quoted 31 lines

---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++++++++++++++

 1 file changed, 16 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0 -0
index e3a7b77..236696a 100644
@@ -31,6 +31,22 @@
 >  		};
 >  	};

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

Quoted 2 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +2 -0
+	gpio-keys {
+		compatible = "gpio-keys";

+

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

Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +5 -0
+		air-water {
+			label = "air-water";
+			gpios = <&gpio ASPEED_GPIO(B, 5) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(B, 5)>;
+		};

+

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

Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6 -0
+		checkstop {
+			label = "checkstop";
+			gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(J, 2)>;
+		};
+	};

+

Quoted 2 lines

  leds {
  compatible = "gpio-leds";

maintainer Applied
#6 lore raw

Re: [PATCH linux dev-4.7 v5 2/2] ARM: dts: Enable checkstop and cooling gpio keys

Quoted 9 lines · Andrew Jeffery
Quoted 4 lines · Brad Bishop

Enable gpio-keys events for the checkstop and water/air cooled gpios for use by applications on the Witherspoon system.

Flip flop ;)

The bike shed is green.

Merged to dev-4.7. Thanks for your patience Brad.

Cheers,

Joel

Quoted 32 lines
Quoted 32 lines
---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +1 -0
index e3a7b77..236696a 100644
@@ -31,6 +31,22 @@
 >             };
 >     };
 
 > +   gpio-keys {
 > +           compatible = "gpio-keys";
+
 > +           air-water {

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

Quoted 4 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +4 -0
+                   label = "air-water";
+                   gpios = <&gpio ASPEED_GPIO(B, 5) GPIO_ACTIVE_LOW>;
+                   linux,code = <ASPEED_GPIO(B, 5)>;
+           };

+

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

Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +6 -0
+           checkstop {
+                   label = "checkstop";
+                   gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
+                   linux,code = <ASPEED_GPIO(J, 2)>;
+           };
+   };

+

Quoted 2 lines
    leds {
            compatible = "gpio-leds";