Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1446795pxb; Fri, 1 Oct 2021 10:45:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHPM29FLzAp15PiSViAf34IdH67Dqwf6RXmpB4pbaNncrJ+IeIHvWdIz3rnLLp8+0lIXUO X-Received: by 2002:a63:cf0c:: with SMTP id j12mr10856196pgg.411.1633110311066; Fri, 01 Oct 2021 10:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633110311; cv=none; d=google.com; s=arc-20160816; b=0dboy5uN6Yq/Hp8YfwsRtLEU31+LQ87GzNcMO0wQ9y/DBmkV5x99Cu0xWjnDS7pNRa mQT4C7NIBTupSNmPZ8zqYndaudOqiGpR8l7wRrl1b5fLU1QHCU7dAOBXnVxyDqUn2NFh ukqV5qayJmlSlfz6HoIij6mNm76hh/cRYOXw2LVVJRtkKJ6YAv1fyCYmCQWoO/G55ZcZ suwfacw2byyERI9OO5w4IoOxOiTadjiURfxdEtZrW2gJFYzPLfLw2IuFjTgZr06J3a0k NMoNfQE6LUzOGQ1tzGTpU45k5lEvBUTvgiCjgTDLRjANDyxv5GCjSm0ppENnyPxzEDaY ybaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lBVGTkTXgNf+I009NGAKNedlsjlVh/R09z0MATWKFB0=; b=F7fiJxg0a59LuRBOA6Or0R/Nqvc+9rOe+faPr9LQzO3kG9Jb4ra05IvtDsoQvzvS0m Ltbd4Y56jt2CH9ObrOUGSMO+pjautTEm4Pv2mLdkOPsCEL+gl3/uk/+RDjeRzyxeG+3h H9tFhmYzOGE+i9EyBQdkZi9yo6BUf8qSOLAnfEFvQs0fZn4U5vaj4MFeevwqUSBafF3B 9K/ah5sK8xx9n5RF6A2FETmSK0J06eeuQHzfWHv3hXm0tuD0sFoNuDyURSwgRIrLqoMC l1aT+ZtGvrVvOskL0pGZhyUpqAayM72/n/yajfjFnLI86BrSQuD7dQmA8e7M1kTUOt4n ru2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=caXeazUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si9391032plg.230.2021.10.01.10.44.58; Fri, 01 Oct 2021 10:45:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=caXeazUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355223AbhJAR2D (ORCPT + 99 others); Fri, 1 Oct 2021 13:28:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbhJAR2B (ORCPT ); Fri, 1 Oct 2021 13:28:01 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74C17C061775; Fri, 1 Oct 2021 10:26:16 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id t16-20020a1c7710000000b003049690d882so11792651wmi.5; Fri, 01 Oct 2021 10:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lBVGTkTXgNf+I009NGAKNedlsjlVh/R09z0MATWKFB0=; b=caXeazUXd5njPHi5ApOTJv3irww/GZMFnrIm/rDcJSRL94w8mEhS+kTqPVmqhjem6k gLihBl41eB05+TYF5VwKhjRM+HH+UbA6HW5Ehq4IIjkG455/sE0tsTblyNXR+DeGKRIe F732lTfvYnhq2Cur+s+yzy0yXIolsl34osgWmVuFGlfeSY6iI//leHKdNtiphp6b8xhh JzbX6ElivGLqIh+TCScb/flJ4dOClgTMhIHV5cAqx9ppVCpyYjXwYW+5i0buwsaabKgt I9K0Yn4OyEkslrWYplGqGgwojwUJyJAiAhM4buoZSK+Wb2npaqfRZB74KQf6z9ayIf7s A09g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lBVGTkTXgNf+I009NGAKNedlsjlVh/R09z0MATWKFB0=; b=FgQ35YFLRscml1m7b9/uSHw7Dsjtj4i0AjgfMp6of6oYe4elmlWz7K6IEa3wILuwVa np/VRx+4Nvs+i/pol81XLjm5Xv5wIKELpl4CcXVdhjHEAhTVS10DIRG3S2jpOWiuTqgh w/23SK3xM5uk2ceZEH0hD+vUNrizntaqt8BOSWbaTCz0H6mRloRHRW4mTniUQKtpqeS4 ejRXlM0df7xiJiEwLkhiS12VSR1DA6Px4SmAVw6iynvXaFYNO20/6nmoXfggr1ml/TnE viAT0isqKnJT3L2EZl9sf/tN6VEpol4hAPWntPczHPK1oSeSdZzZ9J2fOtxFla9irfoP 11Rw== X-Gm-Message-State: AOAM530uy8qae0fvvE2kiZAYPObgpocOAoPF5qbNnXxmHPBSmS9WHYQ6 SjVa2b0X/chaIgxBFKQeo5E= X-Received: by 2002:a1c:4455:: with SMTP id r82mr2930053wma.100.1633109174985; Fri, 01 Oct 2021 10:26:14 -0700 (PDT) Received: from localhost.localdomain ([94.73.37.210]) by smtp.gmail.com with ESMTPSA id x10sm4861974wmk.42.2021.10.01.10.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:26:14 -0700 (PDT) From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= To: benjamin.tissoires@redhat.com Cc: jikos@kernel.org, rydberg@bitmath.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Subject: [PATCH] HID: multitouch: disable sticky fingers for UPERFECT Y Date: Fri, 1 Oct 2021 19:25:14 +0200 Message-Id: <20211001172513.27822-1-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When a finger is on the screen, the UPERFECT Y portable touchscreen monitor reports a contact in the first place. However, after this initial report, contacts are not reported at the refresh rate of the screen as required by the Windows 8 specs. This behaviour triggers the release_timer, removing the fingers even though they are still present. To avoid it, add a new class, similar to MT_CLS_WIN_8 but without the MT_QUIRK_STICKY_FINGERS quirk for this device. Suggested-by: Benjamin Tissoires Signed-off-by: José Expósito --- drivers/hid/hid-ids.h | 3 +++ drivers/hid/hid-multitouch.c | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 29564b370341..3706c635b12e 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -1276,6 +1276,9 @@ #define USB_DEVICE_ID_WEIDA_8752 0xC300 #define USB_DEVICE_ID_WEIDA_8755 0xC301 +#define USB_VENDOR_ID_WINBOND 0x0416 +#define USB_DEVICE_ID_TSTP_MTOUCH 0xc168 + #define USB_VENDOR_ID_WISEGROUP 0x0925 #define USB_DEVICE_ID_SMARTJOY_PLUS 0x0005 #define USB_DEVICE_ID_SUPER_JOY_BOX_3 0x8888 diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 3ea7cb1cda84..e1afddb7b33d 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -193,6 +193,7 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app); /* reserved 0x0014 */ #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 /* vendor specific classes */ #define MT_CLS_3M 0x0101 @@ -294,6 +295,13 @@ static const struct mt_class mt_classes[] = { MT_QUIRK_WIN8_PTP_BUTTONS | MT_QUIRK_DISABLE_WAKEUP, .export_all_inputs = true }, + { .name = MT_CLS_WIN_8_NO_STICKY_FINGERS, + .quirks = MT_QUIRK_ALWAYS_VALID | + MT_QUIRK_IGNORE_DUPLICATES | + MT_QUIRK_HOVERING | + MT_QUIRK_CONTACT_CNT_ACCURATE | + MT_QUIRK_WIN8_PTP_BUTTONS, + .export_all_inputs = true }, /* * vendor specific classes @@ -2120,6 +2128,11 @@ static const struct hid_device_id mt_devices[] = { MT_USB_DEVICE(USB_VENDOR_ID_VTL, USB_DEVICE_ID_VTL_MULTITOUCH_FF3F) }, + /* Winbond Electronics Corp. */ + { .driver_data = MT_CLS_WIN_8_NO_STICKY_FINGERS, + HID_DEVICE(HID_BUS_ANY, HID_GROUP_MULTITOUCH_WIN_8, + USB_VENDOR_ID_WINBOND, USB_DEVICE_ID_TSTP_MTOUCH) }, + /* Wistron panels */ { .driver_data = MT_CLS_NSMU, MT_USB_DEVICE(USB_VENDOR_ID_WISTRON, -- 2.25.1