From patchwork Thu Aug 20 22:42:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Balla X-Patchwork-Id: 7047241 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 25578C05AC for ; Thu, 20 Aug 2015 22:42:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E5C92058E for ; Thu, 20 Aug 2015 22:42:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8561420585 for ; Thu, 20 Aug 2015 22:42:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbbHTWmP (ORCPT ); Thu, 20 Aug 2015 18:42:15 -0400 Received: from mail-lb0-f193.google.com ([209.85.217.193]:33284 "EHLO mail-lb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751553AbbHTWmP (ORCPT ); Thu, 20 Aug 2015 18:42:15 -0400 Received: by lbcue2 with SMTP id ue2so2525200lbc.0 for ; Thu, 20 Aug 2015 15:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nXM7I/k1YAsrBT3nFmYXpG3VvPyvH8KYjeHL6GufMr0=; b=HJLM+61wbvBw0l2PmP+/Hmtr7daxtygemKGMEvJ5JnNh7p751DF7vS1v7MrpfnsWmO E+3dK/JM92tuZ0jGmbj0vG4bW1CDzpcRAmOH+fRKZnOiCOBDY4JgSytnT+pdbu129VXO JZY+jp9C3CsP1HynXVWa01QOyBc7LDAc30vd+eMwbFvDIY7nioZxPi9JhY09O/ZFLjuO wZ/oL0cRtTSGfUhqQ1giTSvHkxdEu30B8kV73jwsHlYt2uCOhZ0NrEapfcfG1fKjWQVo zdyU/xkdg3x+m5lUggTiHuj7tGoXl8rYHKrWEC+NzhL9WAaky/O/ryVVAxhzmEz5X2u2 3xMA== MIME-Version: 1.0 X-Received: by 10.112.199.133 with SMTP id jk5mr5108713lbc.32.1440110533359; Thu, 20 Aug 2015 15:42:13 -0700 (PDT) Received: by 10.25.135.137 with HTTP; Thu, 20 Aug 2015 15:42:13 -0700 (PDT) In-Reply-To: References: <20150820213526.GA10980@localhost> Date: Fri, 21 Aug 2015 00:42:13 +0200 Message-ID: Subject: Re: PROBLEM: Missing events on thinkpad trackpoint buttons From: Gabor Balla To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Benjamin Tissoires , Stephen Chandler Paul , Nick Bowler , Andrew Duggan 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 Dmitry, I've prepared another possible fix, that checks the current mode for Wmode bit. Regards, Gabor else --- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 6025eb4..7ec72a6 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -519,15 +519,19 @@ 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) - 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 (!SYN_MODE_WMODE(priv->mode) && priv->disable_gesture) + priv->mode |= SYN_BIT_DISABLE_GESTURE; + if (synaptics_mode_cmd(psmouse, priv->mode)) return -1; @@ -1280,6 +1284,10 @@ static ssize_t synaptics_set_disable_gesture(struct psmouse *psmouse, return len; priv->disable_gesture = value; + + if (SYN_MODE_WMODE(priv->mode)) + return len; + if (value) priv->mode |= SYN_BIT_DISABLE_GESTURE;