USB HID Multitouch

Hi @all

I want to connect a selfmade i2c->usb_hid_multitouch controller (STM32F401 based) to VIM3.
What conditions must be met for it to work?
It seems to me that its driver, the hid-multitouch kernel module, should be assigned by VID and PID, but I cannot find it in the file system.

kvim3:/ # modprobe hid-multitouch
modprobe: /etc/modprobe.conf: No such file or directory
modprobe: /etc/modprobe.d: No such file or directory
modprobe: chdir '/lib/modules/4.9.113'

I use Android 9 x64, official images and self built image


Use lsusb to view, you can see the device PID/VID; use getevent to view, if there is no related device. Indicates that the system does not recognize the touch screen

1.common\drivers\hid\hid-ids.h, define VID, PID macro


2.common\drivers\hid\hid-multitouch.c, add device information
in function
static const struct hid_device_id mt_devices[] added

{ .driver_data = MT_CLS_DEFAULT,

3.common\drivers\hid\hid-core.c, this change is added when the device needs to be driven
in function
static const struct hid_device_id hid_have_special_driver[] added、


4.Special attention should be paid to the modification here. After modifying the hid-multitouch.c file, you need to open the compilation macro CONFIG_HID_MULTITOUCH to compile the file, otherwise the modification will not take effect. The compiled macro is opened in the configuration file \common\arch\arm64\configs\kvim_defconfig, and it is generally closed by default