Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2246193pxp; Mon, 21 Mar 2022 14:53:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGQtuXtnilxOKNqQiUdABHmduoqzp9qjveetXRHNBerACFYArRhL35/iZ49xoGkzCyD8CH X-Received: by 2002:a17:90a:730b:b0:1c6:781a:312f with SMTP id m11-20020a17090a730b00b001c6781a312fmr1254242pjk.53.1647899597494; Mon, 21 Mar 2022 14:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647899597; cv=none; d=google.com; s=arc-20160816; b=HWBEIy0rahQ+Q+L8uDdJP9daf1EJcORd/XTYOFp3ozcnM0Pjkuzj2JUh3GfK5chfUI gmDZl5/ocGpxLymie/VP8TO/QUIVSwZL1Ci5d7tjR3Ts0tVoFQNPWyJCpCXOFBguGeTi Sg68ZxX7bFhCWc/o48JQCRGWIF5Chv2d21IaTvjCHRV4j8IO/MWNuzgRVG/uArDYneAJ 0LAFil/9dNcBxbfaiYFllU9f+IV/LvjKdY4GeB00MDuvZonwHFBogqg+uV5Mj/zy0rkv mmdnrSN5uqb2LFu8MnQd9cEohZ7xbvwWUEb0fS2hvp+BtUK0il9PT9OdC55QorU45WVE DYqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GzohBbkrXG4LXx7mo3/JLEha1Z8wnON9GrcgVqSwS/Y=; b=Z+ASeKGPxlDIHcqSVYLIfkiIRku2Y/iXWffURXlFBcDB3VdHVz8qwcUh8fSxK8bjeG /ImDq9l7aJHFmqoqJcclY5o+DX61Z2x/Bawgec1Yk/vuCdYDWcUUtS9ZOYXqRHNuvPCC btIWCalgDk7Tw/Qr7WQb9/oinfgrHt5LAxY6tfPch4MDvrUHGQcMO/fbf3rmtItfJvtG nQskuRY+yV8v2anmNs0jIO/YFyHOtMLYZ+8LRRuEcVsu4/hsFwp5RABXYS+Y+f0bEw6U p7RhbePDnkJmBr3ZqzRdCGt9StF3dtENB/D69FjaWfrYnOMzb/lkTVXOg/hXSYF++d9Z Il+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UbP75GyG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v9-20020a170902e8c900b00153b2d164cfsi13620605plg.215.2022.03.21.14.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 14:53:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UbP75GyG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EA4A61EF5C6; Mon, 21 Mar 2022 14:20:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345873AbiCUJ1D (ORCPT + 99 others); Mon, 21 Mar 2022 05:27:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345861AbiCUJ1B (ORCPT ); Mon, 21 Mar 2022 05:27:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E25CF65154 for ; Mon, 21 Mar 2022 02:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647854735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GzohBbkrXG4LXx7mo3/JLEha1Z8wnON9GrcgVqSwS/Y=; b=UbP75GyGALyKef6rFedLwC281x+CcooNeA7xh34InzUtPgjlWcnQMaLWcnVZzaCzrYUbYU CArPmUGWapV+ioHbMb7EK1bepM49VzRqXiSdSEX03ezsTTcy+0otrSFT6J/hDBSLsJHZrs VKHfEd0MqCucHMyPfZCjm5uwt/UiuJ8= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-381-ioT026ynNiWXfdDsJNW_2Q-1; Mon, 21 Mar 2022 05:25:33 -0400 X-MC-Unique: ioT026ynNiWXfdDsJNW_2Q-1 Received: by mail-pf1-f199.google.com with SMTP id w19-20020aa79553000000b004fa64758b82so6177305pfq.22 for ; Mon, 21 Mar 2022 02:25:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GzohBbkrXG4LXx7mo3/JLEha1Z8wnON9GrcgVqSwS/Y=; b=Gs97eD3vKnX6G2kYjf6hygwxg6n0XWi7tmNN+NTthr4QmHmq6Oid7WdXHjJZGANnZm Ndpmg9Eq9kWPZmlGVkhHYpu3nmMOAq6wFu8M8bF93nKim4r24PMUrUgQaT5QdS1xcMCZ QmerPVvcnTZzq2bZ5LiGb8jZCY580iLngqe9KY4xLBxNU7cLC0I0CvsijHmD+Vu+T/ST m13ItYQKMn2+p3CA7x4+U/5bWSC6GhSnuz+YDXwS/HDFllmjLRNPgh6RWlv0XwFYtovV OnOOexzOavPQQZR3DPT2SDea06VRoyjDeQJOvQFKsnZ74QC8KSIOlHIlzdrmuCzw9a3/ M91Q== X-Gm-Message-State: AOAM533ZwfDwZolaYNk/+rwK8NyHbGWU39fqORpLHXs07jlb2TvGAvyx mqP6WKGi5NHpk2tFoQ5+FrqfqGHRR2JQW6J5v7afj5iUMBZn8t6J0WzGAMXVLixYaYoAFp1Zr0d Vh6fd1REvfOJTbg9j66nSlBRJd0spgSuC03M8KEF8 X-Received: by 2002:a05:6a00:2182:b0:4fa:6d20:d95d with SMTP id h2-20020a056a00218200b004fa6d20d95dmr16423572pfi.83.1647854732190; Mon, 21 Mar 2022 02:25:32 -0700 (PDT) X-Received: by 2002:a05:6a00:2182:b0:4fa:6d20:d95d with SMTP id h2-20020a056a00218200b004fa6d20d95dmr16423547pfi.83.1647854731876; Mon, 21 Mar 2022 02:25:31 -0700 (PDT) MIME-Version: 1.0 References: <20220320190602.7484-1-jose.exposito89@gmail.com> In-Reply-To: <20220320190602.7484-1-jose.exposito89@gmail.com> From: Benjamin Tissoires Date: Mon, 21 Mar 2022 10:25:20 +0100 Message-ID: Subject: Re: [PATCH] HID: multitouch: fix Dell Precision 7550 and 7750 button type To: =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= Cc: jkosina@suse.cz, tiwai@suse.de, regressions@leemhuis.info, peter.hutterer@who-t.net, linux-input@vger.kernel.org, stable@vger.kernel.org, regressions@lists.linux.dev, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jos=C3=A9, On Sun, Mar 20, 2022 at 8:06 PM Jos=C3=A9 Exp=C3=B3sito wrote: > > The touchpad present in the Dell Precision 7550 and 7750 laptops > reports a HID_DG_BUTTONTYPE of type MT_BUTTONTYPE_CLICKPAD. However, > the device is not a clickpad, it is a touchpad with physical buttons. > > In order to fix this issue, a quirk for the device was introduced in > libinput [1] [2] to disable the INPUT_PROP_BUTTONPAD property: > > [Precision 7x50 Touchpad] > MatchBus=3Di2c > MatchUdevType=3Dtouchpad > MatchDMIModalias=3Ddmi:*svnDellInc.:pnPrecision7?50* > AttrInputPropDisable=3DINPUT_PROP_BUTTONPAD > > However, because of the change introduced in 37ef4c19b4 ("Input: clear > BTN_RIGHT/MIDDLE on buttonpads") the BTN_RIGHT key bit is not mapped > anymore breaking the device right click button. > > In order to fix the issue, create a quirk for the device forcing its > button type to touchpad regardless of the value reported by the > firmware. > > [1] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/481 > [2] https://bugzilla.redhat.com/show_bug.cgi?id=3D1868789 > > Fixes: 37ef4c19b4 ("Input: clear BTN_RIGHT/MIDDLE on buttonpads") > Signed-off-by: Jos=C3=A9 Exp=C3=B3sito > --- Thanks for the patch. However, I'd like to put this one on hold for a bit. I am discussing it right now with Peter and we are trying to see what are the possible implications of starting to fix those in the kernel one by one. So Jiri, please hold on before applying this one. Cheers, Benjamin > drivers/hid/hid-ids.h | 3 +++ > drivers/hid/hid-multitouch.c | 20 ++++++++++++++++++++ > 2 files changed, 23 insertions(+) > > diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h > index 78bd3ddda442..6cf7a5b6835b 100644 > --- a/drivers/hid/hid-ids.h > +++ b/drivers/hid/hid-ids.h > @@ -287,6 +287,9 @@ > > #define USB_VENDOR_ID_CIDC 0x1677 > > +#define USB_VENDOR_ID_CIRQUE_CORP 0x0488 > +#define USB_DEVICE_ID_DELL_PRECISION_7X50 0x120A > + > #define USB_VENDOR_ID_CJTOUCH 0x24b8 > #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0020 0x0020 > #define USB_DEVICE_ID_CJTOUCH_MULTI_TOUCH_0040 0x0040 > diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c > index 99eabfb4145b..f012cf8e0b8c 100644 > --- a/drivers/hid/hid-multitouch.c > +++ b/drivers/hid/hid-multitouch.c > @@ -71,6 +71,7 @@ MODULE_LICENSE("GPL"); > #define MT_QUIRK_SEPARATE_APP_REPORT BIT(19) > #define MT_QUIRK_FORCE_MULTI_INPUT BIT(20) > #define MT_QUIRK_DISABLE_WAKEUP BIT(21) > +#define MT_QUIRK_BUTTONTYPE_TOUCHPAD BIT(22) > > #define MT_INPUTMODE_TOUCHSCREEN 0x02 > #define MT_INPUTMODE_TOUCHPAD 0x03 > @@ -194,6 +195,7 @@ static void mt_post_parse(struct mt_device *td, struc= t 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_BUTTONTYPE_TOUCHPAD 0x0018 > > /* vendor specific classes */ > #define MT_CLS_3M 0x0101 > @@ -302,6 +304,15 @@ static const struct mt_class mt_classes[] =3D { > MT_QUIRK_CONTACT_CNT_ACCURATE | > MT_QUIRK_WIN8_PTP_BUTTONS, > .export_all_inputs =3D true }, > + { .name =3D MT_CLS_BUTTONTYPE_TOUCHPAD, > + .quirks =3D MT_QUIRK_ALWAYS_VALID | > + MT_QUIRK_IGNORE_DUPLICATES | > + MT_QUIRK_HOVERING | > + MT_QUIRK_CONTACT_CNT_ACCURATE | > + MT_QUIRK_STICKY_FINGERS | > + MT_QUIRK_WIN8_PTP_BUTTONS | > + MT_QUIRK_BUTTONTYPE_TOUCHPAD, > + .export_all_inputs =3D true }, > > /* > * vendor specific classes > @@ -1286,6 +1297,9 @@ static int mt_touch_input_configured(struct hid_dev= ice *hdev, > (app->buttons_count =3D=3D 1)) > td->is_buttonpad =3D true; > > + if (app->quirks & MT_QUIRK_BUTTONTYPE_TOUCHPAD) > + td->is_buttonpad =3D false; > + > if (td->is_buttonpad) > __set_bit(INPUT_PROP_BUTTONPAD, input->propbit); > > @@ -1872,6 +1886,12 @@ static const struct hid_device_id mt_devices[] =3D= { > MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, > USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) }, > > + /* Cirque Corp (Dell Precision 7550 and 7750 touchpad) */ > + { .driver_data =3D MT_CLS_BUTTONTYPE_TOUCHPAD, > + HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8, > + USB_VENDOR_ID_CIRQUE_CORP, > + USB_DEVICE_ID_DELL_PRECISION_7X50) }, > + > /* CJTouch panels */ > { .driver_data =3D MT_CLS_NSMU, > MT_USB_DEVICE(USB_VENDOR_ID_CJTOUCH, > -- > 2.25.1 >