diff --git a/boards/arm/a1x/pcduino-a10/src/a1x_bringup.c b/boards/arm/a1x/pcduino-a10/src/a1x_bringup.c index 755b208b77..09c090b500 100644 --- a/boards/arm/a1x/pcduino-a10/src/a1x_bringup.c +++ b/boards/arm/a1x/pcduino-a10/src/a1x_bringup.c @@ -30,7 +30,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -62,7 +62,7 @@ int a1x_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_bringup.c b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_bringup.c index cdd5a4a296..b7fb83019b 100644 --- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_bringup.c +++ b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_bringup.c @@ -247,8 +247,8 @@ int imxrt_bringup(void) imxrt_lcd_initialize(); #endif -#ifdef CONFIG_BUTTONS -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS_LOWER /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); @@ -261,8 +261,8 @@ int imxrt_bringup(void) /* Enable BUTTON support for some other purpose */ board_button_initialize(); -#endif /* CONFIG_BUTTONS_LOWER */ -#endif /* CONFIG_BUTTONS */ +#endif /* CONFIG_INPUT_BUTTONS_LOWER */ +#endif /* CONFIG_INPUT_BUTTONS */ #ifdef CONFIG_VIDEO_FB /* Initialize and register the framebuffer driver */ diff --git a/boards/arm/kinetis/freedom-k66f/configs/nsh/defconfig b/boards/arm/kinetis/freedom-k66f/configs/nsh/defconfig index a44c27010a..8d2575d715 100644 --- a/boards/arm/kinetis/freedom-k66f/configs/nsh/defconfig +++ b/boards/arm/kinetis/freedom-k66f/configs/nsh/defconfig @@ -23,8 +23,6 @@ CONFIG_BOARDCTL_RESET=y CONFIG_BOARDCTL_UNIQUEID=y CONFIG_BOARD_LOOPSPERMSEC=10016 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_ZERO=y @@ -43,6 +41,8 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_I2C_RESET=y CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_KINETIS_FTM0=y CONFIG_KINETIS_FTM0_CHANNEL=2 CONFIG_KINETIS_FTM0_PWM=y diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_bringup.c b/boards/arm/kinetis/freedom-k66f/src/k66_bringup.c index b26b71ead8..f3517d6f67 100644 --- a/boards/arm/kinetis/freedom-k66f/src/k66_bringup.c +++ b/boards/arm/kinetis/freedom-k66f/src/k66_bringup.c @@ -130,7 +130,7 @@ int k66_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/netnsh/defconfig b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/netnsh/defconfig index 53dde4efff..3c15a105ed 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/netnsh/defconfig +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/netnsh/defconfig @@ -18,11 +18,11 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STDARG_H=y CONFIG_BOARD_LOOPSPERMSEC=21082 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_ETH0_PHY_LAN8720=y CONFIG_FS_PROCFS=y CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_LIB_HOSTNAME="LpcXpresso-Lpc54628" CONFIG_LPC54_EMC=y CONFIG_LPC54_EMC_DYNAMIC_CS0=y diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/nsh/defconfig b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/nsh/defconfig index 2a6d9314ed..0f8c9e8a8f 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/nsh/defconfig +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/nsh/defconfig @@ -19,8 +19,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STDARG_H=y CONFIG_BOARD_LOOPSPERMSEC=21082 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_EXAMPLES_BUTTONS=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y @@ -29,6 +27,8 @@ CONFIG_FS_PROCFS=y CONFIG_I2C=y CONFIG_I2CTOOL_MAXBUS=9 CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_LPC54_EMC=y CONFIG_LPC54_EMC_DYNAMIC_CS0=y CONFIG_LPC54_GPIOIRQ=y diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_bringup.c b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_bringup.c index 689c540d07..3f80e3d013 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_bringup.c +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_bringup.c @@ -33,7 +33,7 @@ # include #endif -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS_LOWER # include #endif @@ -161,7 +161,7 @@ int lpc54_bringup(void) } #endif -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS_LOWER /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c b/boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c index c99c991dd8..dc553e540f 100644 --- a/boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c +++ b/boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c @@ -29,7 +29,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -71,7 +71,7 @@ int s32k1xx_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c b/boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c index 6fb9c70618..24485d16fd 100644 --- a/boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c +++ b/boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c @@ -29,7 +29,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -71,7 +71,7 @@ int s32k1xx_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/s32k1xx/s32k118evb/src/s32k1xx_bringup.c b/boards/arm/s32k1xx/s32k118evb/src/s32k1xx_bringup.c index fb57c2d2ff..0da50ac701 100644 --- a/boards/arm/s32k1xx/s32k118evb/src/s32k1xx_bringup.c +++ b/boards/arm/s32k1xx/s32k118evb/src/s32k1xx_bringup.c @@ -29,7 +29,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -65,7 +65,7 @@ int s32k1xx_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/s32k1xx/s32k144evb/src/s32k1xx_bringup.c b/boards/arm/s32k1xx/s32k144evb/src/s32k1xx_bringup.c index 016f762af2..2ea5dfb5ef 100644 --- a/boards/arm/s32k1xx/s32k144evb/src/s32k1xx_bringup.c +++ b/boards/arm/s32k1xx/s32k144evb/src/s32k1xx_bringup.c @@ -29,7 +29,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -70,7 +70,7 @@ int s32k1xx_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/s32k1xx/s32k146evb/src/s32k1xx_bringup.c b/boards/arm/s32k1xx/s32k146evb/src/s32k1xx_bringup.c index b627feaed2..2e67204b3d 100644 --- a/boards/arm/s32k1xx/s32k146evb/src/s32k1xx_bringup.c +++ b/boards/arm/s32k1xx/s32k146evb/src/s32k1xx_bringup.c @@ -29,7 +29,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -70,7 +70,7 @@ int s32k1xx_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/s32k1xx/s32k148evb/src/s32k1xx_bringup.c b/boards/arm/s32k1xx/s32k148evb/src/s32k1xx_bringup.c index 5e32b176cc..3dec9b390c 100644 --- a/boards/arm/s32k1xx/s32k148evb/src/s32k1xx_bringup.c +++ b/boards/arm/s32k1xx/s32k148evb/src/s32k1xx_bringup.c @@ -29,7 +29,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -69,7 +69,7 @@ int s32k1xx_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32/axoloti/configs/nsh/defconfig b/boards/arm/stm32/axoloti/configs/nsh/defconfig index 7b043d4f4e..7e4ba0a064 100644 --- a/boards/arm/stm32/axoloti/configs/nsh/defconfig +++ b/boards/arm/stm32/axoloti/configs/nsh/defconfig @@ -19,10 +19,10 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F427I=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_BOARD_LOOPSPERMSEC=16717 -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_CLOCK_MONOTONIC=y CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_MM_REGIONS=2 CONFIG_NSH_ARCHINIT=y diff --git a/boards/arm/stm32/axoloti/src/stm32_bringup.c b/boards/arm/stm32/axoloti/src/stm32_bringup.c index 2d7be190bb..d69fa08456 100644 --- a/boards/arm/stm32/axoloti/src/stm32_bringup.c +++ b/boards/arm/stm32/axoloti/src/stm32_bringup.c @@ -56,7 +56,7 @@ # include "stm32_usbhost.h" #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -137,7 +137,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c b/boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c index 052f701a6b..499161f9d1 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_bringup.c @@ -160,7 +160,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c index 19c67a8fb9..56ed037bca 100644 --- a/boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c +++ b/boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c @@ -30,7 +30,7 @@ #include "nucleo-f207zg.h" -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f302r8/src/stm32_bringup.c index 48b5d1c609..cf7485fe65 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_bringup.c +++ b/boards/arm/stm32/nucleo-f302r8/src/stm32_bringup.c @@ -33,7 +33,7 @@ # include #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -76,7 +76,7 @@ int stm32_bringup(void) { int ret; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c index 17c2e75e42..bc98d8818a 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c +++ b/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c @@ -30,7 +30,7 @@ #include "nucleo-f303ze.h" -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c index f57e4f22e2..eb3894dcf9 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c @@ -39,7 +39,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -71,7 +71,7 @@ int stm32_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c index d2222ab098..786826d4c2 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c +++ b/boards/arm/stm32/olimex-stm32-p407/src/stm32_bringup.c @@ -180,7 +180,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32/photon/src/Make.defs b/boards/arm/stm32/photon/src/Make.defs index 6ad7fb90c6..1e4b623730 100644 --- a/boards/arm/stm32/photon/src/Make.defs +++ b/boards/arm/stm32/photon/src/Make.defs @@ -30,7 +30,7 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif -ifeq ($(CONFIG_BUTTONS),y) +ifeq ($(CONFIG_INPUT_BUTTONS),y) CSRCS += stm32_buttons.c endif diff --git a/boards/arm/stm32/photon/src/stm32_bringup.c b/boards/arm/stm32/photon/src/stm32_bringup.c index 87acb1f9ba..9f10a60f06 100644 --- a/boards/arm/stm32/photon/src/stm32_bringup.c +++ b/boards/arm/stm32/photon/src/stm32_bringup.c @@ -102,8 +102,8 @@ int stm32_bringup(void) #endif /* CONFIG_USERLED_LOWER */ #endif /* CONFIG_USERLED && !CONFIG_ARCH_LEDS */ -#ifdef CONFIG_BUTTONS -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS_LOWER /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); @@ -116,8 +116,8 @@ int stm32_bringup(void) /* Enable BUTTON support for some other purpose */ board_button_initialize(); -#endif /* CONFIG_BUTTONS_LOWER */ -#endif /* CONFIG_BUTTONS */ +#endif /* CONFIG_INPUT_BUTTONS_LOWER */ +#endif /* CONFIG_INPUT_BUTTONS */ #ifdef CONFIG_STM32_IWDG /* Initialize the watchdog timer */ diff --git a/boards/arm/stm32/stm32f103-minimum/configs/buttons/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/buttons/defconfig index bbd79944ef..c0d09be4a5 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/buttons/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/buttons/defconfig @@ -30,11 +30,11 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_DEFAULT_SMALL=y CONFIG_EXAMPLES_BUTTONS=y CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_MAX_TASKS=16 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_bringup.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_bringup.c index 05da10653f..f593a8c997 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_bringup.c @@ -44,7 +44,7 @@ # include "stm32_usbhost.h" #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -392,7 +392,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_buttons.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_buttons.c index 335f24c432..a0149acc5d 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_buttons.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_buttons.c @@ -40,7 +40,7 @@ * Pre-processor Definitions ****************************************************************************/ -#if defined(CONFIG_BUTTONS) && !defined(CONFIG_ARCH_IRQBUTTONS) +#if defined(CONFIG_INPUT_BUTTONS) && !defined(CONFIG_ARCH_IRQBUTTONS) # error "The NuttX Buttons Driver depends on IRQ support to work!\n" #endif diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c index a5a3924730..cafe505c0c 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c @@ -42,7 +42,7 @@ # include "stm32_usbhost.h" #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -342,7 +342,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig b/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig index 574f3dd84f..9ca5066735 100644 --- a/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig +++ b/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig @@ -22,8 +22,6 @@ CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARD_LOOPSPERMSEC=2796 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_CLOCK_MONOTONIC=y CONFIG_DEFAULT_SMALL=y CONFIG_DISABLE_MOUNTPOINT=y @@ -31,6 +29,8 @@ CONFIG_DISABLE_MQUEUE=y CONFIG_EXAMPLES_CHRONO=y CONFIG_EXAMPLES_SLCD=y CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LCD=y CONFIG_LIB_SLCDCODEC=y diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_bringup.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_bringup.c index 394a15ccb7..3de08262b9 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_bringup.c @@ -88,8 +88,8 @@ int stm32_bringup(void) #endif /* CONFIG_USERLED_LOWER */ #endif /* CONFIG_USERLED && !CONFIG_ARCH_LEDS */ -#ifdef CONFIG_BUTTONS -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS_LOWER /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); @@ -101,8 +101,8 @@ int stm32_bringup(void) /* Enable BUTTON support for some other purpose */ board_button_initialize(); -#endif /* CONFIG_BUTTONS_LOWER */ -#endif /* CONFIG_BUTTONS */ +#endif /* CONFIG_INPUT_BUTTONS_LOWER */ +#endif /* CONFIG_INPUT_BUTTONS */ #ifdef CONFIG_STM32_LCD /* Initialize the SLCD and register the SLCD device as /dev/slcd0 */ diff --git a/boards/arm/stm32/stm32vldiscovery/src/stm32_bringup.c b/boards/arm/stm32/stm32vldiscovery/src/stm32_bringup.c index fd814b87a6..b018ecb8fb 100644 --- a/boards/arm/stm32/stm32vldiscovery/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32vldiscovery/src/stm32_bringup.c @@ -30,7 +30,7 @@ # include #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -63,7 +63,7 @@ int stm32_bringup(void) { int ret = OK; -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/configs/nsh/defconfig b/boards/arm/stm32f0l0g0/nucleo-g070rb/configs/nsh/defconfig index addab2d75e..59bc2488e4 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/configs/nsh/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/configs/nsh/defconfig @@ -19,8 +19,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=2796 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEV_GPIO=y @@ -38,6 +36,8 @@ CONFIG_I2C=y CONFIG_I2CTOOL_MAXADDR=0xff CONFIG_I2CTOOL_MINADDR=0x00 CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_MAX_TASKS=8 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c index eaccd511f3..023b6ce97b 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c @@ -168,7 +168,7 @@ int stm32_bringup(void) stm32_i2ctool(); #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/stm32_bringup.c b/boards/arm/stm32f7/stm32f746g-disco/src/stm32_bringup.c index 0924829099..d1943e1fb7 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/src/stm32_bringup.c +++ b/boards/arm/stm32f7/stm32f746g-disco/src/stm32_bringup.c @@ -32,7 +32,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -83,7 +83,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c index eee9fefebf..72e7a5d02e 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c +++ b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c @@ -40,7 +40,7 @@ #include "nucleo-h743zi.h" -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -205,7 +205,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); @@ -213,7 +213,7 @@ int stm32_bringup(void) { syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret); } -#endif /* CONFIG_BUTTONS */ +#endif /* CONFIG_INPUT_BUTTONS */ #ifdef HAVE_USBHOST /* Initialize USB host operation. stm32_usbhost_initialize() diff --git a/boards/arm/stm32h7/stm32h747i-disco/src/stm32_bringup.c b/boards/arm/stm32h7/stm32h747i-disco/src/stm32_bringup.c index 21d472d883..025931eca2 100644 --- a/boards/arm/stm32h7/stm32h747i-disco/src/stm32_bringup.c +++ b/boards/arm/stm32h7/stm32h747i-disco/src/stm32_bringup.c @@ -32,7 +32,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -180,7 +180,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); @@ -188,7 +188,7 @@ int stm32_bringup(void) { syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret); } -#endif /* CONFIG_BUTTONS */ +#endif /* CONFIG_INPUT_BUTTONS */ #ifdef CONFIG_ADC /* Initialize ADC and register the ADC driver. */ diff --git a/boards/arm/stm32l4/nucleo-l452re/src/stm32_bringup.c b/boards/arm/stm32l4/nucleo-l452re/src/stm32_bringup.c index 7ff4539894..aa25c3c081 100644 --- a/boards/arm/stm32l4/nucleo-l452re/src/stm32_bringup.c +++ b/boards/arm/stm32l4/nucleo-l452re/src/stm32_bringup.c @@ -82,8 +82,8 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS_LOWER iinfo("Initializing button driver\n"); /* Register the BUTTON driver */ @@ -98,7 +98,7 @@ int stm32_bringup(void) board_button_initialize(); #endif -#endif /* CONFIG_BUTTONS */ +#endif /* CONFIG_INPUT_BUTTONS */ #ifdef HAVE_I2C_DRIVER /* Get the I2C lower half instance */ diff --git a/boards/arm/stm32l5/nucleo-l552ze/configs/nsh/defconfig b/boards/arm/stm32l5/nucleo-l552ze/configs/nsh/defconfig index db231f0fbc..f5db81706b 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/configs/nsh/defconfig +++ b/boards/arm/stm32l5/nucleo-l552ze/configs/nsh/defconfig @@ -20,8 +20,6 @@ CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARD_LOOPSPERMSEC=4230 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_DEBUG_ASSERTIONS=y CONFIG_DEBUG_ERROR=y CONFIG_DEBUG_FEATURES=y @@ -37,6 +35,8 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_MAX_TASKS=16 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y diff --git a/boards/arm/stm32l5/nucleo-l552ze/src/stm32_bringup.c b/boards/arm/stm32l5/nucleo-l552ze/src/stm32_bringup.c index ec5bfe661b..7120a37288 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/src/stm32_bringup.c +++ b/boards/arm/stm32l5/nucleo-l552ze/src/stm32_bringup.c @@ -82,8 +82,8 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS_LOWER iinfo("Initializing button driver\n"); /* Register the BUTTON driver */ @@ -98,7 +98,7 @@ int stm32_bringup(void) board_button_initialize(); #endif -#endif /* CONFIG_BUTTONS */ +#endif /* CONFIG_INPUT_BUTTONS */ UNUSED(ret); return OK; diff --git a/boards/arm/stm32l5/stm32l562e-dk/src/stm32_bringup.c b/boards/arm/stm32l5/stm32l562e-dk/src/stm32_bringup.c index daefb8c771..9012b18536 100644 --- a/boards/arm/stm32l5/stm32l562e-dk/src/stm32_bringup.c +++ b/boards/arm/stm32l5/stm32l562e-dk/src/stm32_bringup.c @@ -82,8 +82,8 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS_LOWER iinfo("Initializing button driver\n"); /* Register the BUTTON driver */ @@ -98,7 +98,7 @@ int stm32_bringup(void) board_button_initialize(); #endif -#endif /* CONFIG_BUTTONS */ +#endif /* CONFIG_INPUT_BUTTONS */ UNUSED(ret); return OK; diff --git a/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_bringup.c b/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_bringup.c index dae1d87630..5835238ca3 100644 --- a/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_bringup.c +++ b/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_bringup.c @@ -34,7 +34,7 @@ #include -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -337,7 +337,7 @@ int tm4c_bringup(void) } #endif -#ifdef CONFIG_BUTTONS_LOWER +#ifdef CONFIG_INPUT_BUTTONS_LOWER /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/arm/xmc4/xmc4500-relax/src/Makefile b/boards/arm/xmc4/xmc4500-relax/src/Makefile index 902aee9959..e438de87ae 100644 --- a/boards/arm/xmc4/xmc4500-relax/src/Makefile +++ b/boards/arm/xmc4/xmc4500-relax/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs CSRCS = xmc4_boot.c xmc4_bringup.c -ifeq ($(CONFIG_BUTTONS),y) +ifeq ($(CONFIG_INPUT_BUTTONS),y) CSRCS += xmc4_buttons.c endif diff --git a/boards/arm/xmc4/xmc4700-relax/src/Makefile b/boards/arm/xmc4/xmc4700-relax/src/Makefile index e329a0647e..ecdbcca2e0 100644 --- a/boards/arm/xmc4/xmc4700-relax/src/Makefile +++ b/boards/arm/xmc4/xmc4700-relax/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs CSRCS = xmc4_boot.c xmc4_bringup.c -ifeq ($(CONFIG_BUTTONS),y) +ifeq ($(CONFIG_INPUT_BUTTONS),y) CSRCS += xmc4_buttons.c endif diff --git a/boards/risc-v/fe310/hifive1-revb/configs/nsh/defconfig b/boards/risc-v/fe310/hifive1-revb/configs/nsh/defconfig index 1d8c43a250..07f3f1a88e 100644 --- a/boards/risc-v/fe310/hifive1-revb/configs/nsh/defconfig +++ b/boards/risc-v/fe310/hifive1-revb/configs/nsh/defconfig @@ -23,9 +23,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_BINFMT_DISABLE=y CONFIG_BOARD_LOOPSPERMSEC=15000 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y -CONFIG_BUTTONS_NPOLLWAITERS=1 CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEFAULT_SMALL=y @@ -40,6 +37,9 @@ CONFIG_EXAMPLES_HELLO_STACKSIZE=1024 CONFIG_FS_PROCFS=y CONFIG_IDLETHREAD_STACKSIZE=1536 CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y +CONFIG_INPUT_BUTTONS_NPOLLWAITERS=1 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y diff --git a/boards/risc-v/fe310/hifive1-revb/src/fe310_bringup.c b/boards/risc-v/fe310/hifive1-revb/src/fe310_bringup.c index 9955fc6657..27e3e88b63 100644 --- a/boards/risc-v/fe310/hifive1-revb/src/fe310_bringup.c +++ b/boards/risc-v/fe310/hifive1-revb/src/fe310_bringup.c @@ -56,7 +56,7 @@ int fe310_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/sim/sim/sim/src/sim_bringup.c b/boards/sim/sim/sim/src/sim_bringup.c index 2c8c201199..772f30c732 100644 --- a/boards/sim/sim/sim/src/sim_bringup.c +++ b/boards/sim/sim/sim/src/sim_bringup.c @@ -47,7 +47,7 @@ #include #endif -#if defined(CONFIG_BUTTONS_LOWER) && defined(CONFIG_SIM_BUTTONS) +#if defined(CONFIG_INPUT_BUTTONS_LOWER) && defined(CONFIG_SIM_BUTTONS) #include #endif @@ -402,7 +402,7 @@ int sim_bringup(void) #endif #endif -#if defined(CONFIG_BUTTONS_LOWER) && defined(CONFIG_SIM_BUTTONS) +#if defined(CONFIG_INPUT_BUTTONS_LOWER) && defined(CONFIG_SIM_BUTTONS) ret = btn_lower_initialize("/dev/buttons"); if (ret < 0) { diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/buttons/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/buttons/defconfig index 34e5229455..37bcef8a4d 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/buttons/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/buttons/defconfig @@ -21,8 +21,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_ESP32_GPIO_IRQ=y CONFIG_ESP32_UART0=y CONFIG_EXAMPLES_BUTTONS=y @@ -31,6 +29,8 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=3072 CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_MAX_TASKS=16 CONFIG_MM_REGIONS=3 diff --git a/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c b/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c index 13d0048774..62f0f3b3dd 100644 --- a/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c +++ b/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c @@ -78,7 +78,7 @@ # include "esp32_aes.h" #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -337,7 +337,7 @@ int esp32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/buttons/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/buttons/defconfig index f6f65f866d..f92bd2f75f 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/buttons/defconfig +++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/buttons/defconfig @@ -20,8 +20,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_ESP32_GPIO_IRQ=y CONFIG_ESP32_UART0=y CONFIG_EXAMPLES_BUTTONS=y @@ -30,6 +28,8 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=3072 CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_MAX_TASKS=16 CONFIG_MM_REGIONS=3 diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_bringup.c b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_bringup.c index 85f0cc7f3f..b77a66e7ae 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_bringup.c +++ b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_bringup.c @@ -62,7 +62,7 @@ # include "esp32_board_wlan.h" #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -249,7 +249,7 @@ int esp32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/buttons/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/buttons/defconfig index 6e50f4d383..6b7d0fbaf9 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/buttons/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/buttons/defconfig @@ -21,8 +21,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y -CONFIG_BUTTONS=y -CONFIG_BUTTONS_LOWER=y CONFIG_ESP32_GPIO_IRQ=y CONFIG_ESP32_UART0=y CONFIG_EXAMPLES_BUTTONS=y @@ -31,6 +29,8 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=3072 CONFIG_INPUT=y +CONFIG_INPUT_BUTTONS=y +CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_MAX_TASKS=16 CONFIG_MM_REGIONS=3 diff --git a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c index 9f4557208e..467dd2927b 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c +++ b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c @@ -71,7 +71,7 @@ # include "esp32_bmp180.h" #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS # include #endif @@ -303,7 +303,7 @@ int esp32_bringup(void) } #endif -#ifdef CONFIG_BUTTONS +#ifdef CONFIG_INPUT_BUTTONS /* Register the BUTTON driver */ ret = btn_lower_initialize("/dev/buttons"); diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index e74cc939b3..2590863bea 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -437,15 +437,15 @@ config INPUT_CYPRESS_MBR3108_NPOLLWAITERS endif # INPUT_CYPRESS_MBR3108 -config BUTTONS +config INPUT_BUTTONS bool "Button Inputs" default n ---help--- Enable standard button upper half driver. -if BUTTONS +if INPUT_BUTTONS -config BUTTONS_LOWER +config INPUT_BUTTONS_LOWER bool "Generic Lower Half Button Driver" default n depends on ARCH_BUTTONS && ARCH_IRQBUTTONS @@ -466,11 +466,11 @@ config BUTTONS_LOWER board src/ directory and modified for your specific board requirements. -config BUTTONS_NPOLLWAITERS +config INPUT_BUTTONS_NPOLLWAITERS int "Max Number of Poll Waiters" default 2 -endif # BUTTONS +endif # INPUT_BUTTONS config DJOYSTICK bool "Discrete Joystick" diff --git a/drivers/input/Make.defs b/drivers/input/Make.defs index 0f2dc4dc57..e25c72131e 100644 --- a/drivers/input/Make.defs +++ b/drivers/input/Make.defs @@ -64,9 +64,9 @@ ifeq ($(CONFIG_INPUT_CYPRESS_MBR3108),y) CSRCS += cypress_mbr3108.c endif -ifeq ($(CONFIG_BUTTONS),y) +ifeq ($(CONFIG_INPUT_BUTTONS),y) CSRCS += button_upper.c -ifeq ($(CONFIG_BUTTONS_LOWER),y) +ifeq ($(CONFIG_INPUT_BUTTONS_LOWER),y) CSRCS += button_lower.c endif diff --git a/drivers/input/button_lower.c b/drivers/input/button_lower.c index 7854fb51b4..1f400a85cc 100644 --- a/drivers/input/button_lower.c +++ b/drivers/input/button_lower.c @@ -34,7 +34,7 @@ #include -#if CONFIG_BUTTONS_LOWER +#if CONFIG_INPUT_BUTTONS_LOWER /**************************************************************************** * Private Function Prototypes @@ -220,4 +220,4 @@ int btn_lower_initialize(FAR const char *devname) return btn_register(devname, &g_btnlower); } -#endif /* CONFIG_BUTTONS_LOWER */ +#endif /* CONFIG_INPUT_BUTTONS_LOWER */ diff --git a/drivers/input/button_upper.c b/drivers/input/button_upper.c index 7955337666..d7388c4126 100644 --- a/drivers/input/button_upper.c +++ b/drivers/input/button_upper.c @@ -95,7 +95,7 @@ struct btn_open_s * driver events. */ - FAR struct pollfd *bo_fds[CONFIG_BUTTONS_NPOLLWAITERS]; + FAR struct pollfd *bo_fds[CONFIG_INPUT_BUTTONS_NPOLLWAITERS]; }; /**************************************************************************** @@ -283,7 +283,7 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv) { /* Yes.. Notify all waiters */ - for (i = 0; i < CONFIG_BUTTONS_NPOLLWAITERS; i++) + for (i = 0; i < CONFIG_INPUT_BUTTONS_NPOLLWAITERS; i++) { FAR struct pollfd *fds = opriv->bo_fds[i]; if (fds) @@ -693,7 +693,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds, * slot for the poll structure reference */ - for (i = 0; i < CONFIG_BUTTONS_NPOLLWAITERS; i++) + for (i = 0; i < CONFIG_INPUT_BUTTONS_NPOLLWAITERS; i++) { /* Find an available slot */ @@ -707,7 +707,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds, } } - if (i >= CONFIG_BUTTONS_NPOLLWAITERS) + if (i >= CONFIG_INPUT_BUTTONS_NPOLLWAITERS) { ierr("ERROR: Too many poll waiters\n"); fds->priv = NULL; diff --git a/include/nuttx/input/buttons.h b/include/nuttx/input/buttons.h index 968cecd932..c98c80ac72 100644 --- a/include/nuttx/input/buttons.h +++ b/include/nuttx/input/buttons.h @@ -36,8 +36,8 @@ /* Configuration ************************************************************/ -#ifndef CONFIG_BUTTONS_NPOLLWAITERS -# define CONFIG_BUTTONS_NPOLLWAITERS 2 +#ifndef CONFIG_INPUT_BUTTONS_NPOLLWAITERS +# define CONFIG_INPUT_BUTTONS_NPOLLWAITERS 2 #endif /* ioctl commands */ @@ -198,7 +198,7 @@ int btn_register(FAR const char *devname, * ****************************************************************************/ -#if CONFIG_BUTTONS_LOWER +#if CONFIG_INPUT_BUTTONS_LOWER int btn_lower_initialize(FAR const char *devname); #endif