Advice on fixing the bug of MSFT0001:00 04F3:Touchpad being handled by hid_multitouch by mistake

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm working on a touchpad device issue as reported on
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1887190.

This touchpad device MSFT0001:00 04F3:Touchpad should be handled by
hid_rmi. But currently hid-core.c chooses hid_multitouch by mistake,

    1. When scanning this device's report descriptor, HID_DG_CONTACTID
       usage is found. Thus group HID_GROUP_MULTITOUCH is assigned to
       the device.
    2. The flag HID_SCAN_FLAG_MT_WIN_8 is also found. Thus group
       HID_GROUP_MULTITOUCH_WIN_8 is assigned to the device.
    3. hid-multitouch.c claims handling devices with the group of
       HID_GROUP_MULTITOUCH_WIN_8

        static const struct hid_device_id mt_devices[] = {
	        /* Generic MT device */
	        { HID_DEVICE(HID_BUS_ANY, HID_GROUP_MULTITOUCH, HID_ANY_ID, HID_ANY_ID) },

	        /* Generic Win 8 certified MT device */
	        {  .driver_data = MT_CLS_WIN_8,
		        HID_DEVICE(HID_BUS_ANY, HID_GROUP_MULTITOUCH_WIN_8,
			        HID_ANY_ID, HID_ANY_ID) },
	        { }
        };

There are several potential solutions,
    - Let the device vendor fix this problem since this device's report
      descriptor shouldn't have the HID_DG_CONTACTID usage.
    - Make it a special case by setting the device's group to
      HID_GROUP_RMI in hid_scan_report when vendor id and product ID
      are matched.
    - hid-quirks.c seems to be designed to handle special cases, is it
      suitable for this case?

Can anyone give an advice on which direction I should take? Thank you!

--
Best regards,
Coiby



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux