From 35e3bfcdefed68891ae488010ac1948d79c8063a Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Fri, 4 Aug 2023 10:02:48 +0000 Subject: [PATCH] drivers: input: drop the zephyr,gpio-keys binding This is now redundant and `gpio-keys` can be used instead. Signed-off-by: Fabio Baltieri --- drivers/input/Kconfig.gpio_keys | 2 +- drivers/input/input_gpio_keys.c | 7 ++----- dts/bindings/input/zephyr,gpio-keys.yaml | 6 ------ tests/drivers/build_all/input/app.overlay | 2 +- tests/drivers/input/gpio_keys/boards/native_posix.overlay | 2 +- 5 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 dts/bindings/input/zephyr,gpio-keys.yaml diff --git a/drivers/input/Kconfig.gpio_keys b/drivers/input/Kconfig.gpio_keys index d10cd7c723..2c3e8737a2 100644 --- a/drivers/input/Kconfig.gpio_keys +++ b/drivers/input/Kconfig.gpio_keys @@ -4,7 +4,7 @@ config INPUT_GPIO_KEYS bool "GPIO Keys input driver" default y - depends on DT_HAS_GPIO_KEYS_ENABLED || DT_HAS_ZEPHYR_GPIO_KEYS_ENABLED + depends on DT_HAS_GPIO_KEYS_ENABLED depends on GPIO help Enable support for GPIO Keys input driver. diff --git a/drivers/input/input_gpio_keys.c b/drivers/input/input_gpio_keys.c index ffe5c882ed..947a6ce94e 100644 --- a/drivers/input/input_gpio_keys.c +++ b/drivers/input/input_gpio_keys.c @@ -4,6 +4,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +#define DT_DRV_COMPAT gpio_keys + #include #include #include @@ -180,9 +182,4 @@ static int gpio_keys_init(const struct device *dev) &gpio_keys_config_##i, POST_KERNEL, CONFIG_INPUT_INIT_PRIORITY, \ NULL); -#define DT_DRV_COMPAT gpio_keys -DT_INST_FOREACH_STATUS_OKAY(GPIO_KEYS_INIT) - -#undef DT_DRV_COMPAT -#define DT_DRV_COMPAT zephyr_gpio_keys DT_INST_FOREACH_STATUS_OKAY(GPIO_KEYS_INIT) diff --git a/dts/bindings/input/zephyr,gpio-keys.yaml b/dts/bindings/input/zephyr,gpio-keys.yaml deleted file mode 100644 index 6adc52da6a..0000000000 --- a/dts/bindings/input/zephyr,gpio-keys.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2022 Google LLC -# SPDX-License-Identifier: Apache-2.0 - -compatible: "zephyr,gpio-keys" - -include: [gpio-keys.yaml] diff --git a/tests/drivers/build_all/input/app.overlay b/tests/drivers/build_all/input/app.overlay index 4c41459d8a..4a1956be5d 100644 --- a/tests/drivers/build_all/input/app.overlay +++ b/tests/drivers/build_all/input/app.overlay @@ -18,7 +18,7 @@ }; gpio-keys { - compatible = "zephyr,gpio-keys"; + compatible = "gpio-keys"; debounce-interval-ms = <30>; button_0 { gpios = <&test_gpio 0 0>; diff --git a/tests/drivers/input/gpio_keys/boards/native_posix.overlay b/tests/drivers/input/gpio_keys/boards/native_posix.overlay index c878e8c501..9a6137b97f 100644 --- a/tests/drivers/input/gpio_keys/boards/native_posix.overlay +++ b/tests/drivers/input/gpio_keys/boards/native_posix.overlay @@ -10,7 +10,7 @@ / { buttons: gpio-keys0 { - compatible = "zephyr,gpio-keys"; + compatible = "gpio-keys"; debounce-interval-ms = <30>; voldown_button: button_0 {