Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20210402130227.21478-1-nicolas.ferre@microchip.com

authored by

Ludovic Desroches and committed by
Nicolas Ferre
ca7a049a 174c80b2

+18 -9
+2 -1
arch/arm/boot/dts/at91-sam9x60ek.dts
··· 8 8 */ 9 9 /dts-v1/; 10 10 #include "sam9x60.dtsi" 11 + #include <dt-bindings/input/input.h> 11 12 12 13 / { 13 14 model = "Microchip SAM9X60-EK"; ··· 85 84 sw1 { 86 85 label = "SW1"; 87 86 gpios = <&pioD 18 GPIO_ACTIVE_LOW>; 88 - linux,code=<0x104>; 87 + linux,code=<KEY_PROG1>; 89 88 wakeup-source; 90 89 }; 91 90 };
+2 -1
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
··· 11 11 #include "at91-sama5d27_som1.dtsi" 12 12 #include <dt-bindings/mfd/atmel-flexcom.h> 13 13 #include <dt-bindings/gpio/gpio.h> 14 + #include <dt-bindings/input/input.h> 14 15 15 16 / { 16 17 model = "Atmel SAMA5D27 SOM1 EK"; ··· 467 466 pb4 { 468 467 label = "USER"; 469 468 gpios = <&pioA PIN_PA29 GPIO_ACTIVE_LOW>; 470 - linux,code = <0x104>; 469 + linux,code = <KEY_PROG1>; 471 470 wakeup-source; 472 471 }; 473 472 };
+2 -1
arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts
··· 8 8 */ 9 9 /dts-v1/; 10 10 #include "at91-sama5d27_wlsom1.dtsi" 11 + #include <dt-bindings/input/input.h> 11 12 12 13 / { 13 14 model = "Microchip SAMA5D27 WLSOM1 EK"; ··· 36 35 sw4 { 37 36 label = "USER BUTTON"; 38 37 gpios = <&pioA PIN_PB2 GPIO_ACTIVE_LOW>; 39 - linux,code = <0x104>; 38 + linux,code = <KEY_PROG1>; 40 39 wakeup-source; 41 40 }; 42 41 };
+2 -1
arch/arm/boot/dts/at91-sama5d2_icp.dts
··· 12 12 #include "sama5d2.dtsi" 13 13 #include "sama5d2-pinfunc.h" 14 14 #include <dt-bindings/gpio/gpio.h> 15 + #include <dt-bindings/input/input.h> 15 16 #include <dt-bindings/mfd/atmel-flexcom.h> 16 17 17 18 / { ··· 52 51 sw4 { 53 52 label = "USER_PB1"; 54 53 gpios = <&pioA PIN_PD0 GPIO_ACTIVE_LOW>; 55 - linux,code = <0x104>; 54 + linux,code = <KEY_PROG1>; 56 55 wakeup-source; 57 56 }; 58 57 };
+2 -1
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts
··· 11 11 #include "sama5d2-pinfunc.h" 12 12 #include <dt-bindings/mfd/atmel-flexcom.h> 13 13 #include <dt-bindings/gpio/gpio.h> 14 + #include <dt-bindings/input/input.h> 14 15 #include <dt-bindings/pinctrl/at91.h> 15 16 16 17 / { ··· 403 402 bp1 { 404 403 label = "PB_USER"; 405 404 gpios = <&pioA PIN_PA10 GPIO_ACTIVE_LOW>; 406 - linux,code = <0x104>; 405 + linux,code = <KEY_PROG1>; 407 406 wakeup-source; 408 407 }; 409 408 };
+2 -1
arch/arm/boot/dts/at91-sama5d2_xplained.dts
··· 10 10 #include "sama5d2-pinfunc.h" 11 11 #include <dt-bindings/mfd/atmel-flexcom.h> 12 12 #include <dt-bindings/gpio/gpio.h> 13 + #include <dt-bindings/input/input.h> 13 14 #include <dt-bindings/regulator/active-semi,8945a-regulator.h> 14 15 15 16 / { ··· 713 712 bp1 { 714 713 label = "PB_USER"; 715 714 gpios = <&pioA PIN_PB9 GPIO_ACTIVE_LOW>; 716 - linux,code = <0x104>; 715 + linux,code = <KEY_PROG1>; 717 716 wakeup-source; 718 717 }; 719 718 };
+2 -1
arch/arm/boot/dts/at91-sama5d3_xplained.dts
··· 7 7 */ 8 8 /dts-v1/; 9 9 #include "sama5d36.dtsi" 10 + #include <dt-bindings/input/input.h> 10 11 11 12 / { 12 13 model = "SAMA5D3 Xplained"; ··· 355 354 bp3 { 356 355 label = "PB_USER"; 357 356 gpios = <&pioE 29 GPIO_ACTIVE_LOW>; 358 - linux,code = <0x104>; 357 + linux,code = <KEY_PROG1>; 359 358 wakeup-source; 360 359 }; 361 360 };
+2 -1
arch/arm/boot/dts/at91sam9260ek.dts
··· 7 7 */ 8 8 /dts-v1/; 9 9 #include "at91sam9260.dtsi" 10 + #include <dt-bindings/input/input.h> 10 11 11 12 / { 12 13 model = "Atmel at91sam9260ek"; ··· 157 156 btn4 { 158 157 label = "Button 4"; 159 158 gpios = <&pioA 31 GPIO_ACTIVE_LOW>; 160 - linux,code = <0x104>; 159 + linux,code = <KEY_PROG1>; 161 160 wakeup-source; 162 161 }; 163 162 };
+2 -1
arch/arm/boot/dts/at91sam9g20ek_common.dtsi
··· 5 5 * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> 6 6 */ 7 7 #include "at91sam9g20.dtsi" 8 + #include <dt-bindings/input/input.h> 8 9 9 10 / { 10 11 ··· 235 234 btn4 { 236 235 label = "Button 4"; 237 236 gpios = <&pioA 31 GPIO_ACTIVE_LOW>; 238 - linux,code = <0x104>; 237 + linux,code = <KEY_PROG1>; 239 238 wakeup-source; 240 239 }; 241 240 };