Skip to content

Commit 57e0da4

Browse files
fabiobaltiericarlescufi
authored andcommitted
boards: add zephyr,code properties to the various gpio-keys nodes
Add gpio-keys codes for all boards. These are mostly INPUT_KEY_0 and so on but I've used some more specific ones where it was obvious that there's something else on the boards. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent b8e2729 commit 57e0da4

File tree

306 files changed

+930
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+930
-88
lines changed

boards/arc/em_starterkit/board.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* SPDX-License-Identifier: Apache-2.0 */
22

3+
#include <zephyr/dt-bindings/input/input-event-codes.h>
4+
35
/ {
46
aliases {
57
led0 = &led0;
@@ -63,36 +65,43 @@
6365
/* gpio flags need validation */
6466
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
6567
label = "Push button switch 0";
68+
zephyr,code = <INPUT_KEY_0>;
6669
};
6770
button1: button_1 {
6871
/* gpio flags need validation */
6972
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
7073
label = "Push button switch 1";
74+
zephyr,code = <INPUT_KEY_1>;
7175
};
7276
button2: button_2 {
7377
/* gpio flags need validation */
7478
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
7579
label = "Push button switch 2";
80+
zephyr,code = <INPUT_KEY_2>;
7681
};
7782
switch0: switch_0 {
7883
/* gpio flags need validation */
7984
gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
8085
label = "DIP SW1 - Switch 1";
86+
zephyr,code = <INPUT_KEY_3>;
8187
};
8288
switch1: switch_1 {
8389
/* gpio flags need validation */
8490
gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
8591
label = "DIP SW1 - Switch 2";
92+
zephyr,code = <INPUT_KEY_4>;
8693
};
8794
switch2: switch_2 {
8895
/* gpio flags need validation */
8996
gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
9097
label = "DIP SW1 - Switch 3";
98+
zephyr,code = <INPUT_KEY_5>;
9199
};
92100
switch3: switch_3 {
93101
/* gpio flags need validation */
94102
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
95103
label = "DIP SW1 - Switch 4";
104+
zephyr,code = <INPUT_KEY_6>;
96105
};
97106
};
98107

boards/arc/emsdp/board.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* SPDX-License-Identifier: Apache-2.0 */
22

3+
#include <zephyr/dt-bindings/input/input-event-codes.h>
4+
35
/ {
46
aliases {
57
led0 = &led0;
@@ -58,21 +60,25 @@
5860
/* gpio flags need validation */
5961
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
6062
label = "DIP SW1 - Switch 1";
63+
zephyr,code = <INPUT_KEY_0>;
6164
};
6265
switch1: switch_1 {
6366
/* gpio flags need validation */
6467
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
6568
label = "DIP SW1 - Switch 2";
69+
zephyr,code = <INPUT_KEY_1>;
6670
};
6771
switch2: switch_2 {
6872
/* gpio flags need validation */
6973
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
7074
label = "DIP SW1 - Switch 3";
75+
zephyr,code = <INPUT_KEY_2>;
7176
};
7277
switch3: switch_3 {
7378
/* gpio flags need validation */
7479
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
7580
label = "DIP SW1 - Switch 4";
81+
zephyr,code = <INPUT_KEY_3>;
7682
};
7783
};
7884

boards/arm/96b_argonkey/96b_argonkey.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dts-v1/;
88
#include <st/f4/stm32f412Xg.dtsi>
99
#include <st/f4/stm32f412c(e-g)ux-pinctrl.dtsi>
10+
#include <zephyr/dt-bindings/input/input-event-codes.h>
1011

1112
/ {
1213
model = "Tocoding Argonkey 96boards";
@@ -36,6 +37,7 @@
3637
user_button: button {
3738
label = "User";
3839
gpios = <&gpioa 2 GPIO_ACTIVE_LOW>;
40+
zephyr,code = <INPUT_KEY_0>;
3941
};
4042
};
4143

boards/arm/96b_carbon/96b_carbon.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <st/f4/stm32f401Xe.dtsi>
99
#include <st/f4/stm32f401r(d-e)tx-pinctrl.dtsi>
1010
#include "96b_lscon.dtsi"
11+
#include <zephyr/dt-bindings/input/input-event-codes.h>
1112

1213
/ {
1314
model = "Seeed Studio Carbon 96boards";
@@ -42,6 +43,7 @@
4243
user_button: button {
4344
label = "User";
4445
gpios = <&gpiob 2 GPIO_ACTIVE_LOW>;
46+
zephyr,code = <INPUT_KEY_0>;
4547
};
4648
};
4749

boards/arm/96b_neonkey/96b_neonkey.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dts-v1/;
88
#include <st/f4/stm32f411Xe.dtsi>
99
#include <st/f4/stm32f411c(c-e)ux-pinctrl.dtsi>
10+
#include <zephyr/dt-bindings/input/input-event-codes.h>
1011

1112
/ {
1213
model = "Tocoding Neonkey 96boards";
@@ -44,6 +45,7 @@
4445
user_button: button_0 {
4546
label = "User";
4647
gpios = <&gpiob 2 GPIO_ACTIVE_LOW>;
48+
zephyr,code = <INPUT_KEY_0>;
4749
};
4850
};
4951

boards/arm/96b_nitrogen/96b_nitrogen.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <nordic/nrf52832_qfaa.dtsi>
99
#include "96b_lscon.dtsi"
1010
#include "96b_nitrogen-pinctrl.dtsi"
11+
#include <zephyr/dt-bindings/input/input-event-codes.h>
1112

1213
/ {
1314
model = "Seeed Studio Nitrogen 96board";
@@ -52,6 +53,7 @@
5253
/* gpio flags need validation */
5354
gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
5455
label = "User Push Button";
56+
zephyr,code = <INPUT_KEY_0>;
5557
};
5658
};
5759
};

boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dts-v1/;
88
#include <st/f4/stm32f446Xe.dtsi>
99
#include <st/f4/stm32f446v(c-e)tx-pinctrl.dtsi>
10+
#include <zephyr/dt-bindings/input/input-event-codes.h>
1011

1112
/ {
1213
model = "STMicroelectronics 96Boards STM32 Sensor Mezzanine board";
@@ -40,6 +41,7 @@
4041
user_button: button {
4142
label = "Key";
4243
gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
44+
zephyr,code = <INPUT_KEY_0>;
4345
};
4446
};
4547

boards/arm/actinius_icarus/actinius_icarus_common.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
#include "actinius_icarus_common-pinctrl.dtsi"
7+
#include <zephyr/dt-bindings/input/input-event-codes.h>
78

89
/ {
910
model = "Actinius Icarus IoT Dev Board";
@@ -59,6 +60,7 @@
5960
button0: button_0 {
6061
gpios = <&gpio0 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
6162
label = "Push Button 1";
63+
zephyr,code = <INPUT_KEY_0>;
6264
};
6365
};
6466

boards/arm/actinius_icarus_bee/actinius_icarus_bee_common.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
#include "actinius_icarus_bee_common-pinctrl.dtsi"
7+
#include <zephyr/dt-bindings/input/input-event-codes.h>
78

89
/ {
910
model = "Actinius Icarus Bee";
@@ -59,6 +60,7 @@
5960
button0: button_0 {
6061
gpios = <&gpio0 4 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
6162
label = "Push Button 1";
63+
zephyr,code = <INPUT_KEY_0>;
6264
};
6365
};
6466

boards/arm/actinius_icarus_som_dk/actinius_icarus_som_dk_common.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
#include "actinius_icarus_som_dk_common-pinctrl.dtsi"
77
#include <dt-bindings/led/led.h>
8+
#include <zephyr/dt-bindings/input/input-event-codes.h>
89

910
/ {
1011
model = "Actinius Icarus SoM DK";
@@ -40,6 +41,7 @@
4041
button0: button_0 {
4142
gpios = <&gpio0 23 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
4243
label = "Push Button 1";
44+
zephyr,code = <INPUT_KEY_0>;
4345
};
4446
};
4547

0 commit comments

Comments
 (0)