From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965394AbbI2N6Z (ORCPT ); Tue, 29 Sep 2015 09:58:25 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35537 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965123AbbI2N51 (ORCPT ); Tue, 29 Sep 2015 09:57:27 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <20150929134700.766630531@linuxfoundation.org> References: <20150929134700.376714360@linuxfoundation.org> <20150929134700.766630531@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH 3.10 08/56] Input: synaptics - fix handling of disabling gesture mode From: Dmitry Torokhov Date: Tue, 29 Sep 2015 06:57:22 -0700 To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org CC: stable@vger.kernel.org, Nick Bowler , Gabor Balla Message-ID: <00AE1C93-0528-40CB-9B25-36F306DAE15E@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On September 29, 2015 6:46:56 AM PDT, Greg Kroah-Hartman wrote: >3.10-stable review patch. If anyone has any objections, please let me >know. Please drop. > >------------------ > >From: Dmitry Torokhov > >commit e51e38494a8ecc18650efb0c840600637891de2c upstream. > >Bit 2 of the mode byte has dual meaning: it can disable reporting of >gestures when touchpad works in Relative mode or normal Absolute mode, >or it can enable so called Extended W-Mode when touchpad uses enhanced >Absolute mode (W-mode). The extended W-Mode confuses our driver and >causes missing button presses on some Thinkpads (x250, T450s), so let's >make sure we do not enable it. > >Also, according to the spec W mode "... bit is defined only in Absolute >mode on pads whose capExtended capability bit is set. In Relative mode >and >in TouchPads without this capability, the bit is reserved and should be >left at 0.", so let's make sure we respect this requirement as well. > >Reported-by: Nick Bowler >Suggested-by: Gabor Balla >Tested-by: Gabor Balla >Tested-by: Nick Bowler >Signed-off-by: Dmitry Torokhov >Signed-off-by: Greg Kroah-Hartman > >--- > drivers/input/mouse/synaptics.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >--- a/drivers/input/mouse/synaptics.c >+++ b/drivers/input/mouse/synaptics.c >@@ -360,14 +360,18 @@ static int synaptics_set_mode(struct psm > struct synaptics_data *priv = psmouse->private; > > priv->mode = 0; >- if (priv->absolute_mode) >+ >+ if (priv->absolute_mode) { > priv->mode |= SYN_BIT_ABSOLUTE_MODE; >- if (priv->disable_gesture) >+ if (SYN_CAP_EXTENDED(priv->capabilities)) >+ priv->mode |= SYN_BIT_W_MODE; >+ } >+ >+ if (!SYN_MODE_WMODE(priv->mode) && 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; > > if (synaptics_mode_cmd(psmouse, priv->mode)) > return -1; Thanks. -- Dmitry