kernel: add kmod-input-matrix-keypad package
authorCoia Prant <[email protected]>
Fri, 21 Mar 2025 16:13:57 +0000 (00:13 +0800)
committerHauke Mehrtens <[email protected]>
Fri, 19 Sep 2025 22:54:41 +0000 (00:54 +0200)
This module contains driver for GPIO driven matrix keypad.

Signed-off-by: Coia Prant <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/17471
Signed-off-by: Hauke Mehrtens <[email protected]>
package/kernel/linux/modules/input.mk

index 717f8d469d2d6c1828f6e62362c69f2d415e5300..b780c1c4b2e52c84c66089755a3bd1d69a2581c7 100644 (file)
@@ -143,6 +143,23 @@ endef
 $(eval $(call KernelPackage,input-gpio-encoder))
 
 
+define KernelPackage/input-matrix-keypad
+  SUBMENU:=$(INPUT_MODULES_MENU)
+  TITLE:=GPIO matrix keypad support
+  DEPENDS:= @GPIO_SUPPORT +kmod-input-core +kmod-input-matrixkmap
+  KCONFIG:= \
+       CONFIG_KEYBOARD_MATRIX \
+       CONFIG_INPUT_KEYBOARD=y
+  FILES:=$(LINUX_DIR)/drivers/input/keyboard/matrix_keypad.ko
+  AUTOLOAD:=$(call AutoProbe,matrix_keypad,1)
+endef
+
+define KernelPackage/input-matrix-keypad/description
+ Enable support for GPIO driven matrix keypad.
+endef
+
+$(eval $(call KernelPackage,input-matrix-keypad))
+
 define KernelPackage/input-joydev
   SUBMENU:=$(INPUT_MODULES_MENU)
   TITLE:=Joystick device support