From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Tao Jin <tao-j@outlook.com>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hid: multitouch: new device class fix Lenovo X12 trackpad sticky
Date: Thu, 21 Apr 2022 11:12:20 +0200 [thread overview]
Message-ID: <CAO-hwJJE_RAMXQA1kgpxVJWgGOsn64GxbN4fQVq8Dt2xepnYog@mail.gmail.com> (raw)
In-Reply-To: <CO6PR03MB62418A2C022A8E9EDC11A633E1F39@CO6PR03MB6241.namprd03.prod.outlook.com>
On Mon, Apr 18, 2022 at 5:16 AM Tao Jin <tao-j@outlook.com> wrote:
>
> The trackpad of the given device sends continuous report of pointers
> status as per wxn8 spec. However, the spec did not clarify when the
> fingers are lifted so fast that between the interval of two report
> frames fingers on pad reduced from >=2 to 0. The second last report
> contains >=2 fingers with tip state 1 and the last report contains only
> 1 finger with tip state 0. Although this can happen unfrequently, a
> quick fix will be improve the consistency to 100%. A quick fix is to
> disable MT_QUIRK_ALWAYS_VALID and enable MT_QUIRK_NOT_SEEN_MEANS_UP.
> Since it always send reports when fingers on pad
> MT_QUIRK_STICKY_FINGERS is also not needed.
I would really like to see tests for this device added to hid-tools[0].
This would allow me to better understand the issue and also ensure we
are not regressing in the future.
Cheers,
Benjamin
[0] https://gitlab.freedesktop.org/libevdev/hid-tools
>
> In addition to this, I2C device 04CA:00B1 may also need similar class
> but with MT_QUIRK_FORCE_MULTI_INPUT disabled (but it does not harm to
> enable it on non-multi-input device either). The respective owner has
> been notified and a patch may coming soon after test.
>
> Signed-off-by: Tao Jin <tao-j@outlook.com>
> ---
> drivers/hid/hid-multitouch.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 0dece60..3ea57f3 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -194,6 +194,7 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app);
> #define MT_CLS_WIN_8_FORCE_MULTI_INPUT 0x0015
> #define MT_CLS_WIN_8_DISABLE_WAKEUP 0x0016
> #define MT_CLS_WIN_8_NO_STICKY_FINGERS 0x0017
> +#define MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU 0x0018
>
> /* vendor specific classes */
> #define MT_CLS_3M 0x0101
> @@ -286,6 +287,14 @@ static const struct mt_class mt_classes[] = {
> MT_QUIRK_WIN8_PTP_BUTTONS |
> MT_QUIRK_FORCE_MULTI_INPUT,
> .export_all_inputs = true },
> + { .name = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
> + .quirks = MT_QUIRK_IGNORE_DUPLICATES |
> + MT_QUIRK_HOVERING |
> + MT_QUIRK_CONTACT_CNT_ACCURATE |
> + MT_QUIRK_WIN8_PTP_BUTTONS |
> + MT_QUIRK_FORCE_MULTI_INPUT |
> + MT_QUIRK_NOT_SEEN_MEANS_UP,
> + .export_all_inputs = true },
> { .name = MT_CLS_WIN_8_DISABLE_WAKEUP,
> .quirks = MT_QUIRK_ALWAYS_VALID |
> MT_QUIRK_IGNORE_DUPLICATES |
> @@ -783,6 +792,7 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
> case HID_DG_CONFIDENCE:
> if ((cls->name == MT_CLS_WIN_8 ||
> cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT ||
> + cls->name == MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU ||
> cls->name == MT_CLS_WIN_8_DISABLE_WAKEUP) &&
> (field->application == HID_DG_TOUCHPAD ||
> field->application == HID_DG_TOUCHSCREEN))
> @@ -2035,7 +2045,7 @@ static const struct hid_device_id mt_devices[] = {
> USB_DEVICE_ID_LENOVO_X1_TAB3) },
>
> /* Lenovo X12 TAB Gen 1 */
> - { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
> + { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
> HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8,
> USB_VENDOR_ID_LENOVO,
> USB_DEVICE_ID_LENOVO_X12_TAB) },
> --
> 2.35.1
>
prev parent reply other threads:[~2022-04-21 9:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 3:15 [PATCH] hid: multitouch: new device class fix Lenovo X12 trackpad sticky Tao Jin
2022-04-21 9:12 ` Benjamin Tissoires [this message]
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=CAO-hwJJE_RAMXQA1kgpxVJWgGOsn64GxbN4fQVq8Dt2xepnYog@mail.gmail.com \
--to=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tao-j@outlook.com \
/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).