Skip to content

Commit 35e3bfc

Browse files
fabiobaltiericarlescufi
authored andcommitted
drivers: input: drop the zephyr,gpio-keys binding
This is now redundant and `gpio-keys` can be used instead. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 2b489fd commit 35e3bfc

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed

drivers/input/Kconfig.gpio_keys

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
config INPUT_GPIO_KEYS
55
bool "GPIO Keys input driver"
66
default y
7-
depends on DT_HAS_GPIO_KEYS_ENABLED || DT_HAS_ZEPHYR_GPIO_KEYS_ENABLED
7+
depends on DT_HAS_GPIO_KEYS_ENABLED
88
depends on GPIO
99
help
1010
Enable support for GPIO Keys input driver.

drivers/input/input_gpio_keys.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7+
#define DT_DRV_COMPAT gpio_keys
8+
79
#include <zephyr/device.h>
810
#include <zephyr/drivers/gpio.h>
911
#include <zephyr/input/input.h>
@@ -180,9 +182,4 @@ static int gpio_keys_init(const struct device *dev)
180182
&gpio_keys_config_##i, POST_KERNEL, CONFIG_INPUT_INIT_PRIORITY, \
181183
NULL);
182184

183-
#define DT_DRV_COMPAT gpio_keys
184-
DT_INST_FOREACH_STATUS_OKAY(GPIO_KEYS_INIT)
185-
186-
#undef DT_DRV_COMPAT
187-
#define DT_DRV_COMPAT zephyr_gpio_keys
188185
DT_INST_FOREACH_STATUS_OKAY(GPIO_KEYS_INIT)

dts/bindings/input/zephyr,gpio-keys.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/drivers/build_all/input/app.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
};
1919

2020
gpio-keys {
21-
compatible = "zephyr,gpio-keys";
21+
compatible = "gpio-keys";
2222
debounce-interval-ms = <30>;
2323
button_0 {
2424
gpios = <&test_gpio 0 0>;

tests/drivers/input/gpio_keys/boards/native_posix.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
/ {
1212
buttons: gpio-keys0 {
13-
compatible = "zephyr,gpio-keys";
13+
compatible = "gpio-keys";
1414
debounce-interval-ms = <30>;
1515

1616
voldown_button: button_0 {

0 commit comments

Comments
 (0)