linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Coiby Xu <coiby.xu@gmail.com>
To: linux-input@vger.kernel.org
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-kernel-mentees@lists.linuxfoundation.org
Subject: Advice on fixing the bug of MSFT0001:00 04F3:Touchpad being handled by hid_multitouch by mistake
Date: Tue, 11 Aug 2020 17:14:45 +0800	[thread overview]
Message-ID: <20200811091445.erp2b23xmx3ceyzp@Rk> (raw)

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

             reply	other threads:[~2020-08-11  9:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  9:14 Coiby Xu [this message]
2020-09-04  8:16 ` Advice on fixing the bug of MSFT0001:00 04F3:Touchpad being handled by hid_multitouch by mistake Benjamin Tissoires
2020-09-04 14:59   ` Coiby Xu
2020-09-04 16:47     ` Benjamin Tissoires
2020-09-10 16:37       ` Coiby Xu
2020-09-11 12:29         ` Benjamin Tissoires
2020-09-15 10:14           ` Coiby Xu
2020-09-24  7:17             ` Coiby Xu
2020-10-09  8:26               ` Coiby Xu
2020-10-09  8:55                 ` Benjamin Tissoires
2020-10-14 22:09                   ` Coiby Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200811091445.erp2b23xmx3ceyzp@Rk \
    --to=coiby.xu@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).