From patchwork Thu Aug 20 21:35:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 7047161 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C59C49F358 for ; Thu, 20 Aug 2015 21:35:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1881204D5 for ; Thu, 20 Aug 2015 21:35:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 91F91204D3 for ; Thu, 20 Aug 2015 21:35:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbbHTVfb (ORCPT ); Thu, 20 Aug 2015 17:35:31 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:35243 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbbHTVfb (ORCPT ); Thu, 20 Aug 2015 17:35:31 -0400 Received: by pdob1 with SMTP id b1so18457750pdo.2 for ; Thu, 20 Aug 2015 14:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=2Az76b0eUrx/QfoPmwGYGvUYBJs65FN0CKZIAcNhhOg=; b=FPUf/diDLZRCap/BPmL8NWtMsHTrIeWW6Dh8hfHFVN02MC9qetzThDb6iZ3qx8wyRO KanieQK6krd7MKBOhW241GNhu/jLZMSduAaty6XsDmoG3W8hcjO0KCZq2IFRV/65/oyU Z7z2Ek0j/1ureLVGNR65MkhbhnPstWrrqffnqH4sGBp91LSpYn8UwsIpwLLD1nnZPvVD 6+EEBqxWv3DG0TdNqUqyQOtvARqvI/dIUnNqlZ2KcO+1OK2gPd0fxvLqP/ypLLBVHWng XoJxGt7ChVfjtcIhah3o+v8MklXW5fxL+KXRR9xohVxRSvyx8wUuaZBv8gX07knK5ERC Gc+w== X-Received: by 10.70.52.97 with SMTP id s1mr10388994pdo.167.1440106530679; Thu, 20 Aug 2015 14:35:30 -0700 (PDT) Received: from localhost ([69.84.245.29]) by smtp.gmail.com with ESMTPSA id sl7sm5377657pbc.54.2015.08.20.14.35.29 (version=TLS1_2 cipher=AES128-SHA256 bits=128/128); Thu, 20 Aug 2015 14:35:29 -0700 (PDT) Date: Thu, 20 Aug 2015 14:35:26 -0700 From: Dmitry Torokhov To: Gabor Balla Cc: linux-input@vger.kernel.org, Benjamin Tissoires , Stephen Chandler Paul , Nick Bowler , Andrew Duggan Subject: Re: PROBLEM: Missing events on thinkpad trackpoint buttons Message-ID: <20150820213526.GA10980@localhost> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Gabor, On Thu, Aug 20, 2015 at 10:50:27PM +0200, Gabor Balla wrote: > Hi, > > I could also reproduce this issue using a T450s, but have probably found the > issue behind it. > > At some point a new PS/2 mode was introduced by Synaptics, called EWmode. This > can be enabled by setting bit 2 of the mode byte. But previously this bit was > used for 'Disable Gesture', whatever that stands for, and it was reused for > selecting EWmode. Now if plain Wmode is selected, with bit 0 of the mode byte, > than disable gesture is on by default and bit 2 selects EWmode instead. > > Reference: > http://www.synaptics.com/sites/default/files/511-000275-01_RevB.pdf > > The current implementation of the driver doesn't take EWmode into account, and > enables it, when setting both Wmode and what it thinks to be the disable > gesture bit. It is probably selecting EWmode that causes the glitch. > > A quick fix follows: > > diff -ru a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c > --- a/drivers/input/mouse/synaptics.c2015-08-20 22:25:05.261546729 +0200 > +++ b/drivers/input/mouse/synaptics.c2015-08-20 22:21:28.560038539 +0200 > @@ -521,7 +521,7 @@ > priv->mode = 0; > if (priv->absolute_mode) > priv->mode |= SYN_BIT_ABSOLUTE_MODE; > -if (priv->disable_gesture && !SYN_CAP_EXTENDED(priv->capabilities)) > +if (priv->disable_gesture) It looks like the patch "direction" is reverted. Also, the presence of extended capabilities is not the indication that gesture mode should not be used: in relative mode bit 2 disables gesture reporting, in absolute mode it enables Extended W-mode. Does the patch below also work for you? Thanks. diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 28daca1..97c5dde 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -519,12 +519,15 @@ static int synaptics_set_mode(struct psmouse *psmouse) struct synaptics_data *priv = psmouse->private; priv->mode = 0; + if (priv->absolute_mode) priv->mode |= SYN_BIT_ABSOLUTE_MODE; - if (priv->disable_gesture) + else if (priv->disable_gesture) priv->mode |= SYN_BIT_DISABLE_GESTURE; + if (psmouse->rate >= 80) priv->mode |= SYN_BIT_HIGH_RATE; + if (SYN_CAP_EXTENDED(priv->capabilities)) priv->mode |= SYN_BIT_W_MODE; @@ -1482,7 +1485,7 @@ static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode) } priv->absolute_mode = absolute_mode; - if (SYN_ID_DISGEST_SUPPORTED(priv->identity)) + if (!absolute_mode && SYN_ID_DISGEST_SUPPORTED(priv->identity)) priv->disable_gesture = true; /*