From 17612e3ed3a444c02f86c1a3724b98b4d118e558 Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Sat, 28 Dec 2024 09:44:29 +0900 Subject: [PATCH] drivers: input: ft5336: Enable interrupts in conjunction with DT config Enabling `CONFIG_INPUT_FT5336_INTERRUPT` if the ft5336 node in DT has `int-gpios` property. As a result of this change, some boards can eliminate lines that explicitly configure `CONFIG_INPUT_FT5336_INTERRUPT`. Signed-off-by: TOKITA Hiroshi --- boards/ezurio/bl5340_dvk/Kconfig.defconfig | 3 --- boards/m5stack/m5stack_core2/Kconfig.defconfig | 3 --- boards/m5stack/m5stack_cores3/Kconfig.defconfig | 3 --- boards/nxp/rd_rw612_bga/Kconfig.defconfig | 4 ---- boards/renesas/da1469x_dk_pro/Kconfig.defconfig | 3 --- .../shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig | 8 -------- .../buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig | 8 -------- .../buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig | 8 -------- boards/shields/g1120b0mipi/Kconfig.defconfig | 3 --- boards/shields/rk043fn02h_ct/Kconfig.defconfig | 3 --- boards/st/stm32f746g_disco/Kconfig.defconfig | 7 ------- boards/st/stm32f7508_dk/Kconfig.defconfig | 7 ------- boards/st/stm32h7b3i_dk/Kconfig.defconfig | 3 --- drivers/input/Kconfig.ft5336 | 1 + 14 files changed, 1 insertion(+), 63 deletions(-) diff --git a/boards/ezurio/bl5340_dvk/Kconfig.defconfig b/boards/ezurio/bl5340_dvk/Kconfig.defconfig index b71b51265b9169..2f93c265e0a2dc 100644 --- a/boards/ezurio/bl5340_dvk/Kconfig.defconfig +++ b/boards/ezurio/bl5340_dvk/Kconfig.defconfig @@ -72,9 +72,6 @@ config BT_HCI_VS # https://www.buydisplay.com/2-8-inch-tft-touch-shield-for-arduino-w-capacitive-touch-screen-module if DISPLAY -config INPUT_FT5336_INTERRUPT - default y - if LVGL config LV_Z_VDB_SIZE diff --git a/boards/m5stack/m5stack_core2/Kconfig.defconfig b/boards/m5stack/m5stack_core2/Kconfig.defconfig index 155a3c1d39c667..c90a78870ba0e7 100644 --- a/boards/m5stack/m5stack_core2/Kconfig.defconfig +++ b/boards/m5stack/m5stack_core2/Kconfig.defconfig @@ -23,9 +23,6 @@ config GPIO_AXP192_INIT_PRIORITY config REGULATOR_FIXED_INIT_PRIORITY default 75 -config INPUT_FT5336_INTERRUPT - default y if INPUT - config INPUT default y diff --git a/boards/m5stack/m5stack_cores3/Kconfig.defconfig b/boards/m5stack/m5stack_cores3/Kconfig.defconfig index b31bac7c90a14e..fe718f3cf4afd2 100644 --- a/boards/m5stack/m5stack_cores3/Kconfig.defconfig +++ b/boards/m5stack/m5stack_cores3/Kconfig.defconfig @@ -5,9 +5,6 @@ if BOARD_M5STACK_CORES3_ESP32S3_PROCPU || BOARD_M5STACK_CORES3_ESP32S3_PROCPU_SE -config INPUT_FT5336_INTERRUPT - default y if INPUT - config INPUT default y diff --git a/boards/nxp/rd_rw612_bga/Kconfig.defconfig b/boards/nxp/rd_rw612_bga/Kconfig.defconfig index 6f644448c7f912..a0a6022de038ce 100644 --- a/boards/nxp/rd_rw612_bga/Kconfig.defconfig +++ b/boards/nxp/rd_rw612_bga/Kconfig.defconfig @@ -30,10 +30,6 @@ config LV_Z_FLUSH_THREAD endif # LVGL -# Enable interrupt support when using FT5336 driver -config INPUT_FT5336_INTERRUPT - default y if INPUT - if DT_HAS_NXP_ENET_MAC_ENABLED && NETWORKING config NET_L2_ETHERNET diff --git a/boards/renesas/da1469x_dk_pro/Kconfig.defconfig b/boards/renesas/da1469x_dk_pro/Kconfig.defconfig index 496044aa9b6254..3ca13893da1578 100644 --- a/boards/renesas/da1469x_dk_pro/Kconfig.defconfig +++ b/boards/renesas/da1469x_dk_pro/Kconfig.defconfig @@ -29,9 +29,6 @@ endif # LVGL if INPUT -config INPUT_FT5336_INTERRUPT - default y - config LV_Z_POINTER_INPUT_MSGQ_COUNT default 70 diff --git a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig index eb44e86b27141c..07dcda05e05630 100644 --- a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig +++ b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig @@ -5,14 +5,6 @@ if SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2 || SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2_NANO if DISPLAY -if INPUT - -# NOTE: Enable if IRQ line is available (requires to solder jumper) -config INPUT_FT5336_INTERRUPT - default n - -endif # INPUT - if LVGL config LV_Z_VDB_SIZE diff --git a/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig b/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig index 38e54dbec887b4..17653ad01426fe 100644 --- a/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig +++ b/boards/shields/buydisplay_2_8_tft_touch_arduino/Kconfig.defconfig @@ -5,14 +5,6 @@ if SHIELD_BUYDISPLAY_2_8_TFT_TOUCH_ARDUINO if DISPLAY -if INPUT - -# NOTE: Enable if IRQ line is available (requires to solder jumper) -config INPUT_FT5336_INTERRUPT - default n - -endif # INPUT - if LVGL config LV_Z_VDB_SIZE diff --git a/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig b/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig index 1e95dee988eaaa..08024b830a793d 100644 --- a/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig +++ b/boards/shields/buydisplay_3_5_tft_touch_arduino/Kconfig.defconfig @@ -5,14 +5,6 @@ if SHIELD_BUYDISPLAY_3_5_TFT_TOUCH_ARDUINO if DISPLAY -if INPUT - -# NOTE: Enable if IRQ line is available (requires to solder jumper) -config INPUT_FT5336_INTERRUPT - default n - -endif # INPUT - if LVGL config LV_Z_VDB_SIZE diff --git a/boards/shields/g1120b0mipi/Kconfig.defconfig b/boards/shields/g1120b0mipi/Kconfig.defconfig index 5a6971aeef38f5..dd96ec88e06c2b 100644 --- a/boards/shields/g1120b0mipi/Kconfig.defconfig +++ b/boards/shields/g1120b0mipi/Kconfig.defconfig @@ -8,9 +8,6 @@ if LVGL config INPUT default y -config INPUT_FT5336_INTERRUPT - default y - if MIPI_DSI_MCUX_2L # Enable color swap in driver diff --git a/boards/shields/rk043fn02h_ct/Kconfig.defconfig b/boards/shields/rk043fn02h_ct/Kconfig.defconfig index f2b199d916968b..65edfb50c7a502 100644 --- a/boards/shields/rk043fn02h_ct/Kconfig.defconfig +++ b/boards/shields/rk043fn02h_ct/Kconfig.defconfig @@ -8,9 +8,6 @@ if LVGL config INPUT default y -config INPUT_FT5336_INTERRUPT - default y - # LVGL should allocate buffers equal to size of display config LV_Z_VDB_SIZE default 100 diff --git a/boards/st/stm32f746g_disco/Kconfig.defconfig b/boards/st/stm32f746g_disco/Kconfig.defconfig index e617f92308bd77..a3b98a61c92c37 100644 --- a/boards/st/stm32f746g_disco/Kconfig.defconfig +++ b/boards/st/stm32f746g_disco/Kconfig.defconfig @@ -24,13 +24,6 @@ config MEMC endif # DISPLAY -if INPUT - -config INPUT_FT5336_INTERRUPT - default y - -endif # INPUT - config DISK_DRIVER_SDMMC default y if DISK_DRIVERS diff --git a/boards/st/stm32f7508_dk/Kconfig.defconfig b/boards/st/stm32f7508_dk/Kconfig.defconfig index c43b749d79b915..1123e294777341 100644 --- a/boards/st/stm32f7508_dk/Kconfig.defconfig +++ b/boards/st/stm32f7508_dk/Kconfig.defconfig @@ -24,13 +24,6 @@ endif # DISPLAY config INPUT default y if LVGL -if INPUT - -config INPUT_FT5336_INTERRUPT - default y - -endif # INPUT - config DISK_DRIVER_SDMMC default y if DISK_DRIVERS diff --git a/boards/st/stm32h7b3i_dk/Kconfig.defconfig b/boards/st/stm32h7b3i_dk/Kconfig.defconfig index 863570e555a1b8..f4db78be4e5069 100644 --- a/boards/st/stm32h7b3i_dk/Kconfig.defconfig +++ b/boards/st/stm32h7b3i_dk/Kconfig.defconfig @@ -9,9 +9,6 @@ if BOARD_STM32H7B3I_DK config INPUT default y if LVGL -config INPUT_FT5336_INTERRUPT - default y if INPUT_FT5336 - # MEMC needs to be enabled in order to store # display buffer to external SDRAM connected to FMC config MEMC diff --git a/drivers/input/Kconfig.ft5336 b/drivers/input/Kconfig.ft5336 index 1f09483cc32898..782bdb2fdba91b 100644 --- a/drivers/input/Kconfig.ft5336 +++ b/drivers/input/Kconfig.ft5336 @@ -25,6 +25,7 @@ config INPUT_FT5336_PERIOD config INPUT_FT5336_INTERRUPT bool "Interrupt" + default y if $(dt_compat_any_has_prop,$(DT_COMPAT_FOCALTECH_FT5336),int-gpios) help Enable interrupt support (requires GPIO).