From patchwork Thu Aug 20 23:13:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 7047301 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6D9BCC05AC for ; Thu, 20 Aug 2015 23:13:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7C45C20585 for ; Thu, 20 Aug 2015 23:13:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D7A220504 for ; Thu, 20 Aug 2015 23:13:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752317AbbHTXNn (ORCPT ); Thu, 20 Aug 2015 19:13:43 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:35948 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbbHTXNn (ORCPT ); Thu, 20 Aug 2015 19:13:43 -0400 Received: by pawq9 with SMTP id q9so37932268paw.3 for ; Thu, 20 Aug 2015 16:13:42 -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=nXez+2/fOlxT/icADhtZHh3dKTO3LwJFszAyg1L734E=; b=h8b/MdUp716qNflKUGlj6ALkpWPVY0xYxiFaBkU3w2dZ1MvmGGVyvtN079XTKifd+g PdWq/7qU8vi7fjvEniGkesJP14G45TUGmrSOU2qJC2rGpAUfiEuLgQupkgphlNS+G9dC P4ST9xxgxYLutFQVsGh9mAwlfWRX6LaR0gqpHJjA0f9oUg9le0BvHxdCnURFuvOsn9EG NiQ1LT6qTI6zOb1MJZlnRZyKh8GvDbd62IAAz7zM3to4hRM7/fGHvX/xpeEAT1KI7Va2 WA0Op0PQTz9DoTfq9kjb+NWycoHH+WF7i2mGkhpURM2MII+rl7cHUCqOlmw3KmGXVaAL XxHg== X-Received: by 10.66.162.229 with SMTP id yd5mr11206014pab.102.1440112422765; Thu, 20 Aug 2015 16:13:42 -0700 (PDT) Received: from localhost ([69.84.245.29]) by smtp.gmail.com with ESMTPSA id iw8sm5519608pbc.21.2015.08.20.16.13.41 (version=TLS1_2 cipher=AES128-SHA256 bits=128/128); Thu, 20 Aug 2015 16:13:42 -0700 (PDT) Date: Thu, 20 Aug 2015 16:13:39 -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: <20150820231339.GA7236@localhost> References: <20150820213526.GA10980@localhost> <20150820225633.GA12900@localhost> <20150820230840.GB12900@localhost> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150820230840.GB12900@localhost> 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 On Thu, Aug 20, 2015 at 04:08:40PM -0700, Dmitry Torokhov wrote: > Hi Gabor, > > On Fri, Aug 21, 2015 at 01:05:46AM +0200, Gabor Balla wrote: > > Hi Dmitry, > > > > On Fri, Aug 21, 2015 at 1:01 AM, Dmitry Torokhov > > wrote: > > > On Thu, Aug 20, 2015 at 3:56 PM, Dmitry Torokhov > > > wrote: > > >> On Fri, Aug 21, 2015 at 12:24:59AM +0200, Gabor Balla wrote: > > >>> Hi Dmitry, > > >>> > > >>> On Thu, Aug 20, 2015 at 11:35 PM, Dmitry Torokhov > > >>> wrote: > > >>> > On Thu, Aug 20, 2015 at 10:50:27PM +0200, Gabor Balla wrote: > > [...] > > > Ah, wait, not quite still. So we actually do want to disable gestures > > > when in Absolute mode (non extended). Although frankly I do not think > > > we'll ever see pre 4.0 Synaptics device in a wild. > > > > Also notice there is a function called synaptics_set_disable_gesture that can > > change that bit regardless of current mode. > > That attribute is only created when touchpad is used in relative mode, > so should be OK. > > Thanks. How about this one? Thanks. diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 28daca1..d9c9e41 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -519,14 +519,18 @@ static int synaptics_set_mode(struct psmouse *psmouse) 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 (!(priv->mode & SYN_BIT_W_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;