input: Remove legacy KEYBOARD option
authorTom Rini <trini@konsulko.com>
Fri, 14 Oct 2022 11:50:20 +0000 (07:50 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 21 Oct 2022 17:47:56 +0000 (13:47 -0400)
There are no platforms that have not migrated to using DM_KEYBOARD,
remove the legacy option.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
13 files changed:
Makefile
board/kosagi/novena/novena.c
common/stdio.c
configs/chromebit_mickey_defconfig
configs/chromebook_jerry_defconfig
configs/chromebook_minnie_defconfig
configs/chromebook_speedy_defconfig
configs/novena_defconfig
configs/smdk5250_defconfig
configs/smdk5420_defconfig
doc/develop/driver-model/migration.rst
drivers/input/Kconfig
drivers/input/Makefile

index 7cdd31f..6716a57 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1141,7 +1141,6 @@ endif
        $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\
                $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG))
        $(call deprecated,CONFIG_DM_I2C,I2C drivers,v2022.04,$(CONFIG_SYS_I2C_LEGACY))
-       $(call deprecated,CONFIG_DM_KEYBOARD,Keyboard drivers,v2022.10,$(CONFIG_KEYBOARD))
        @# CONFIG_SYS_TIMER_RATE has brackets in it for some boards which
        @# confuses this rule. Use if() to send just a single character which
        @# is enable to tell 'deprecated' that one of these symbols exists
index 815ecf5..f009a8a 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/*
- * GPIO button
- */
-#ifdef CONFIG_KEYBOARD
-static struct input_config button_input;
-
-static int novena_gpio_button_read_keys(struct input_config *input)
-{
-       int key = KEY_ENTER;
-       if (gpio_get_value(NOVENA_BUTTON_GPIO))
-               return 0;
-       input_send_keycodes(&button_input, &key, 1);
-       return 1;
-}
-
-static int novena_gpio_button_getc(struct stdio_dev *dev)
-{
-       return input_getc(&button_input);
-}
-
-static int novena_gpio_button_tstc(struct stdio_dev *dev)
-{
-       return input_tstc(&button_input);
-}
-
-static int novena_gpio_button_init(struct stdio_dev *dev)
-{
-       gpio_direction_input(NOVENA_BUTTON_GPIO);
-       input_set_delays(&button_input, 250, 250);
-       return 0;
-}
-
-int drv_keyboard_init(void)
-{
-       int error;
-       struct stdio_dev dev = {
-               .name   = "button",
-               .flags  = DEV_FLAGS_INPUT,
-               .start  = novena_gpio_button_init,
-               .getc   = novena_gpio_button_getc,
-               .tstc   = novena_gpio_button_tstc,
-       };
-
-       gpio_request(NOVENA_BUTTON_GPIO, "button");
-
-       error = input_init(&button_input, 0);
-       if (error) {
-               debug("%s: Cannot set up input\n", __func__);
-               return -1;
-       }
-       input_add_tables(&button_input, false);
-       button_input.read_keys = novena_gpio_button_read_keys;
-
-       error = input_stdio_register(&dev);
-       if (error)
-               return error;
-
-       return 0;
-}
-#endif
-
 int board_early_init_f(void)
 {
 #if defined(CONFIG_VIDEO_IPUV3)
index e316a35..92811ba 100644 (file)
@@ -373,9 +373,6 @@ int stdio_add_devices(void)
                        drv_video_init();
        }
 
-#if defined(CONFIG_KEYBOARD) && !defined(CONFIG_DM_KEYBOARD)
-       drv_keyboard_init();
-#endif
        drv_system_init();
        serial_stdio_init();
 #ifdef CONFIG_USB_TTY
index dad3b36..657db66 100644 (file)
@@ -68,7 +68,6 @@ CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_I2C_MUX=y
 CONFIG_DM_KEYBOARD=y
-CONFIG_KEYBOARD=y
 CONFIG_CROS_EC_KEYB=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
index a60468e..13ffafc 100644 (file)
@@ -70,7 +70,6 @@ CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_I2C_MUX=y
 CONFIG_DM_KEYBOARD=y
-CONFIG_KEYBOARD=y
 CONFIG_CROS_EC_KEYB=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
index 60fc528..d80dd8e 100644 (file)
@@ -70,7 +70,6 @@ CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_I2C_MUX=y
 CONFIG_DM_KEYBOARD=y
-CONFIG_KEYBOARD=y
 CONFIG_CROS_EC_KEYB=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
index e6f03fa..8e0214d 100644 (file)
@@ -69,7 +69,6 @@ CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SYS_I2C_ROCKCHIP=y
 CONFIG_I2C_MUX=y
 CONFIG_DM_KEYBOARD=y
-CONFIG_KEYBOARD=y
 CONFIG_CROS_EC_KEYB=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
index d4ab938..09338c4 100644 (file)
@@ -67,7 +67,6 @@ CONFIG_LBA48=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MXC=y
-CONFIG_KEYBOARD=y
 CONFIG_FSL_USDHC=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
index 263fcee..fbc4a92 100644 (file)
@@ -48,7 +48,6 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_I2C_S3C24X0=y
-# CONFIG_KEYBOARD is not set
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
index 3a22f6b..23aa152 100644 (file)
@@ -43,7 +43,6 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_I2C_S3C24X0=y
-# CONFIG_KEYBOARD is not set
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
index 742fea5..645c45b 100644 (file)
@@ -99,14 +99,6 @@ The I2C subsystem has supported the driver model since early 2015.
 Maintainers should submit patches switching over to using CONFIG_DM_I2C and
 other base driver model options in time for inclusion in the 2021.10 release.
 
-CONFIG_KEYBOARD
----------------
-Deadline: 2022.10
-
-This is a legacy option which has been replaced by driver model.
-Maintainers should submit patches switching over to using CONFIG_DM_KEYBOARD and
-other base driver model options in time for inclusion in the 2022.10 release.
-
 CONFIG_SYS_TIMER_RATE and CONFIG_SYS_TIMER_COUNTER
 --------------------------------------------------
 Deadline: 2023.01
index 2718b36..1c534be 100644 (file)
@@ -38,15 +38,6 @@ config TPL_DM_KEYBOARD
          includes methods to start/stop the device, check for available
          input and update LEDs if the keyboard has them.
 
-config KEYBOARD
-       bool "Enable legacy keyboard support (deprecated)"
-       help
-         Enable this to enable a custom keyboard support.
-         This simply calls drv_keyboard_init() which must be
-         defined in your board-specific files. This option is deprecated
-         and is only used by novena. For new boards, use driver model
-         instead.
-
 config APPLE_SPI_KEYB
        bool "Enable Apple SPI keyboard support"
        depends on DM_KEYBOARD && DM_SPI
index b1133f7..ded76bd 100644 (file)
@@ -3,7 +3,6 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 
-obj-$(CONFIG_KEYBOARD) += input.o
 obj-$(CONFIG_$(SPL_TPL_)CROS_EC_KEYB) += cros_ec_keyb.o
 obj-$(CONFIG_$(SPL_TPL_)OF_CONTROL) += key_matrix.o
 obj-$(CONFIG_$(SPL_TPL_)DM_KEYBOARD) += input.o keyboard-uclass.o