Skip to content

Commit 111cbd8

Browse files
ldesrochesambarus
authored andcommitted
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 (cherry picked from commit ca7a049) Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent 6599b71 commit 111cbd8

9 files changed

Lines changed: 18 additions & 9 deletions

arch/arm/boot/dts/at91-sam9x60ek.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99
/dts-v1/;
1010
#include "sam9x60.dtsi"
11+
#include <dt-bindings/input/input.h>
1112

1213
/ {
1314
model = "Microchip SAM9X60-EK";
@@ -84,7 +85,7 @@
8485
sw1 {
8586
label = "SW1";
8687
gpios = <&pioD 18 GPIO_ACTIVE_LOW>;
87-
linux,code=<0x104>;
88+
linux,code=<KEY_PROG1>;
8889
wakeup-source;
8990
};
9091
};

arch/arm/boot/dts/at91-sama5d27_som1_ek.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "at91-sama5d27_som1.dtsi"
1212
#include <dt-bindings/mfd/atmel-flexcom.h>
1313
#include <dt-bindings/gpio/gpio.h>
14+
#include <dt-bindings/input/input.h>
1415

1516
/ {
1617
model = "Atmel SAMA5D27 SOM1 EK";
@@ -466,7 +467,7 @@
466467
pb4 {
467468
label = "USER";
468469
gpios = <&pioA PIN_PA29 GPIO_ACTIVE_LOW>;
469-
linux,code = <0x104>;
470+
linux,code = <KEY_PROG1>;
470471
wakeup-source;
471472
};
472473
};

arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99
/dts-v1/;
1010
#include "at91-sama5d27_wlsom1.dtsi"
11+
#include <dt-bindings/input/input.h>
1112

1213
/ {
1314
model = "Microchip SAMA5D27 WLSOM1 EK";
@@ -35,7 +36,7 @@
3536
sw4 {
3637
label = "USER BUTTON";
3738
gpios = <&pioA PIN_PB2 GPIO_ACTIVE_LOW>;
38-
linux,code = <0x104>;
39+
linux,code = <KEY_PROG1>;
3940
wakeup-source;
4041
};
4142
};

arch/arm/boot/dts/at91-sama5d2_icp.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "sama5d2.dtsi"
1313
#include "sama5d2-pinfunc.h"
1414
#include <dt-bindings/gpio/gpio.h>
15+
#include <dt-bindings/input/input.h>
1516
#include <dt-bindings/mfd/atmel-flexcom.h>
1617

1718
/ {
@@ -51,7 +52,7 @@
5152
sw4 {
5253
label = "USER_PB1";
5354
gpios = <&pioA PIN_PD0 GPIO_ACTIVE_LOW>;
54-
linux,code = <0x104>;
55+
linux,code = <KEY_PROG1>;
5556
wakeup-source;
5657
};
5758
};

arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "sama5d2-pinfunc.h"
1212
#include <dt-bindings/mfd/atmel-flexcom.h>
1313
#include <dt-bindings/gpio/gpio.h>
14+
#include <dt-bindings/input/input.h>
1415
#include <dt-bindings/pinctrl/at91.h>
1516

1617
/ {
@@ -402,7 +403,7 @@
402403
bp1 {
403404
label = "PB_USER";
404405
gpios = <&pioA PIN_PA10 GPIO_ACTIVE_LOW>;
405-
linux,code = <0x104>;
406+
linux,code = <KEY_PROG1>;
406407
wakeup-source;
407408
};
408409
};

arch/arm/boot/dts/at91-sama5d2_xplained.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "sama5d2-pinfunc.h"
1111
#include <dt-bindings/mfd/atmel-flexcom.h>
1212
#include <dt-bindings/gpio/gpio.h>
13+
#include <dt-bindings/input/input.h>
1314
#include <dt-bindings/regulator/active-semi,8945a-regulator.h>
1415

1516
/ {
@@ -712,7 +713,7 @@
712713
bp1 {
713714
label = "PB_USER";
714715
gpios = <&pioA PIN_PB9 GPIO_ACTIVE_LOW>;
715-
linux,code = <0x104>;
716+
linux,code = <KEY_PROG1>;
716717
wakeup-source;
717718
};
718719
};

arch/arm/boot/dts/at91-sama5d3_xplained.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
/dts-v1/;
99
#include "sama5d36.dtsi"
10+
#include <dt-bindings/input/input.h>
1011

1112
/ {
1213
model = "SAMA5D3 Xplained";
@@ -354,7 +355,7 @@
354355
bp3 {
355356
label = "PB_USER";
356357
gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
357-
linux,code = <0x104>;
358+
linux,code = <KEY_PROG1>;
358359
wakeup-source;
359360
};
360361
};

arch/arm/boot/dts/at91sam9260ek.dts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
/dts-v1/;
99
#include "at91sam9260.dtsi"
10+
#include <dt-bindings/input/input.h>
1011

1112
/ {
1213
model = "Atmel at91sam9260ek";
@@ -156,7 +157,7 @@
156157
btn4 {
157158
label = "Button 4";
158159
gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
159-
linux,code = <0x104>;
160+
linux,code = <KEY_PROG1>;
160161
wakeup-source;
161162
};
162163
};

arch/arm/boot/dts/at91sam9g20ek_common.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
66
*/
77
#include "at91sam9g20.dtsi"
8+
#include <dt-bindings/input/input.h>
89

910
/ {
1011

@@ -234,7 +235,7 @@
234235
btn4 {
235236
label = "Button 4";
236237
gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
237-
linux,code = <0x104>;
238+
linux,code = <KEY_PROG1>;
238239
wakeup-source;
239240
};
240241
};

0 commit comments

Comments
 (0)