|
本帖最后由 chenkun 于 2024-11-1 17:13 编辑
--- a/arch/arm64/configs/AGN_H2461RO_1702_MX6432_6769U_defconfig +++ b/arch/arm64/configs/AGN_H2461RO_1702_MX6432_6769U_defconfig
@@ -188,6 +188,7 @@ CONFIG_MTK_CPUFREQ_SUGOV_EXT=m
CONFIG_MTK_IRTX_PWM_SUPPORT=m
CONFIG_KEYBOARD_MTK_KPD=m
CONFIG_KEYBOARD_MTK_PMIC=m
+CONFIG_AGENEW_GPIOKEY_DEBOUNCE_NO_SUPPORT=y
CONFIG_EXTCON_MTK_USB=m
CONFIG_MTK_MUSB_DRV_36BIT=y
CONFIG_MTK_MUSB_DUAL_ROLE=y
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
索引 57a7e67582b7..6ea8b843b9cf 100755
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -800,5 +800,11 @@ config KEYBOARD_MTK_PMIC
要将这个驱动程序编译成一个模块,这里选择 M:这个
模块将被称为 mtk-pmic-keys。
+
+config AGENEW_GPIOKEY_DEBOUNCE_NO_SUPPORT
+ bool “Agenew GPIO key cust”
+ help
+ 如果您不想设置 GPIO 防抖,请在此处说 Y。
+ 如果未使用,请说 N.endif
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
旧模式100644
新模式100755
索引 725a196662af..e78bdcadb947
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -538,8 +538,11 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
bool active_low = gpiod_is_active_low(bdata->gpiod);
if (button->debounce_interval) {
+#ifndef CONFIG_AGENEW_GPIOKEY_DEBOUNCE_NO_SUPPORT
error = gpiod_set_debounce(bdata->gpiod,
按钮 >debounce_interval * 1000);
/* 如果 gpiolib 不提供防抖,则使用计时器 */
if (错误 < 0)
+#endif
endif
|
|