kernel: add kmod-usb-hid-mcp2221
authorLeo Soares <leo@hyper.ag>
Sun, 31 Jul 2022 14:21:42 +0000 (15:21 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 5 Aug 2022 12:10:42 +0000 (14:10 +0200)
"The MCP2221 is a USB-to-UART/I2C serial converter which enables
USB connectivity in applications that have a UART and I2C interfaces."
<https://www.microchip.com/en-us/product/MCP2221>

Signed-off-by: Leo Soares <leo@hyper.ag>
(replaced GPIOLIB KConfig with @GPIO_SUPPORT)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
package/kernel/linux/modules/usb.mk

index 8f0eac752288b1f9776db721486108d3d97740e8..84097ac34a06b5ad1179e364e81c8aaa35f5c719 100644 (file)
@@ -1555,6 +1555,23 @@ endef
 $(eval $(call KernelPackage,usb-hid-cp2112))
 
 
+define KernelPackage/usb-hid-mcp2221
+  SUBMENU:=$(USB_MENU)
+  TITLE:=Microchip USB 2.0 to I2C/UART Protocol Converter with GPIO
+  KCONFIG:=CONFIG_HID_MCP2221
+  DEPENDS:=@GPIO_SUPPORT +kmod-usb-hid +kmod-i2c-core
+  FILES:=$(LINUX_DIR)/drivers/hid/hid-mcp2221.ko
+  AUTOLOAD:=$(call AutoProbe,hid-mcp2221)
+endef
+
+define KernelPackage/usb-hid-mcp2221/description
+ HID device driver which registers as an i2c adapter and gpiochip to expose
+ these functions of the MCP2221.
+endef
+
+$(eval $(call KernelPackage,usb-hid-mcp2221))
+
+
 define KernelPackage/usb-yealink
   TITLE:=USB Yealink VOIP phone
   DEPENDS:=+kmod-input-evdev