drivers/input: Rename BUTTONS configs to INPUT_BUTTONS

This commit is contained in:
Gustavo Henrique Nihei
2021-04-08 06:11:14 -03:00
committed by Alan Carvalho de Assis
parent 5719dab8ec
commit 2efae6928d
56 changed files with 119 additions and 119 deletions
+5 -5
View File
@@ -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"
+2 -2
View File
@@ -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
+2 -2
View File
@@ -34,7 +34,7 @@
#include <nuttx/irq.h>
#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 */
+4 -4
View File
@@ -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;