Skip to contentSkip to conversation

ARM: dts: at91: sama5d4_xplained: change the key code of the gpio key

PATCH In review [email protected] 1 participant 2 messages Jul 27, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 ARM: dts: at91: sama5d4_xplained: change the key code of the gpio key

From: Ludovic Desroches <[email protected]>

Having a button code and not a key code causes issues with libinput. udev won't set ID_INPUT_KEY. If it is forced, then it causes a bug within libinput.

---
 arch/arm/boot/dts/at91-sama5d4_xplained.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d4_xplained.dts +2 -1
index 541779af049f..d241c24f0d83 100644
@@ -7,6 +7,7 @@
  */
 /dts-v1/;
 #include "sama5d4.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Atmel SAMA5D4 Xplained";
@@ -250,7 +251,7 @@ gpio_keys {
 		pb_user1 {
 			label = "pb_user1";
 			gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
-			linux,code = <0x100>;
+			linux,code = <KEY_PROG1>;
 			wakeup-source;
 		};
 	};
Signature · 1 line
2.32.0
author maintainer
#1 lore raw
Quoted 10 lines · On 27/07/2021 at 11:13, [email protected] wrote:

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

From: Ludovic Desroches <[email protected]>

Having a button code and not a key code causes issues with libinput. udev won't set ID_INPUT_KEY. If it is forced, then it causes a bug within libinput.

For the record: added to at91-dt for 5.15.

Regards,
Nicolas

Quoted 34 lines
---
  arch/arm/boot/dts/at91-sama5d4_xplained.dts | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d4_xplained.dts +2 -2
index 541779af049f..d241c24f0d83 100644
@@ -7,6 +7,7 @@
   */
  /dts-v1/;
  #include "sama5d4.dtsi"
+#include <dt-bindings/input/input.h>
 
  / {
         model = "Atmel SAMA5D4 Xplained";
@@ -250,7 +251,7 @@ gpio_keys {
                 pb_user1 {
                         label = "pb_user1";
                         gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
-                       linux,code = <0x100>;
+                       linux,code = <KEY_PROG1>;
                         wakeup-source;
                 };
         };
--

2.32.0

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 1 line
Nicolas Ferre