From patchwork Wed Jul 29 20:45:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cpaul@redhat.com X-Patchwork-Id: 6896271 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 E2CFD9F358 for ; Wed, 29 Jul 2015 20:58:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28B6F203B1 for ; Wed, 29 Jul 2015 20:58:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38F5A2039C for ; Wed, 29 Jul 2015 20:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751643AbbG2U6G (ORCPT ); Wed, 29 Jul 2015 16:58:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49070 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbbG2U6E (ORCPT ); Wed, 29 Jul 2015 16:58:04 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id A040236AA1D; Wed, 29 Jul 2015 20:58:04 +0000 (UTC) Received: from whitewolf.com (vpn-63-139.rdu2.redhat.com [10.10.63.139]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6TKjbiO021034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 29 Jul 2015 16:45:38 -0400 From: cpaul@redhat.com To: Douglas Christman Cc: Benjamin Tissoires , =?UTF-8?q?Pali=20Roh=C3=A1r?= , linux-input , Dmitry Torokhov , Hans de Goede Subject: [PATCH 1/1] Input - alps: Fix button reporting on the V2 Alps protocol Date: Wed, 29 Jul 2015 16:45:26 -0400 Message-Id: <1438202726-5100-2-git-send-email-cpaul@redhat.com> In-Reply-To: <1438202726-5100-1-git-send-email-cpaul@redhat.com> References: <1438202726-5100-1-git-send-email-cpaul@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Stephen Chandler Paul The data concerning which buttons on the touchpad are held down or not are in the fourth packet we receive from the mouse, not the first. Signed-off-by: Stephen Chandler Paul --- drivers/input/mouse/alps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 113d6f1..e2f9b25 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -254,9 +254,9 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse) /* Non interleaved V2 dualpoint has separate stick button bits */ if (priv->proto_version == ALPS_PROTO_V2 && priv->flags == (ALPS_PASS | ALPS_DUALPOINT)) { - left |= packet[0] & 1; - right |= packet[0] & 2; - middle |= packet[0] & 4; + left |= packet[3] & 1; + right |= packet[3] & 2; + middle |= packet[3] & 4; } alps_report_buttons(dev, dev2, left, right, middle);