From patchwork Fri Apr 24 14:48:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 6270821 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 E5C3FBF4A6 for ; Fri, 24 Apr 2015 14:49:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F7B2202E5 for ; Fri, 24 Apr 2015 14:49:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3478C2035B for ; Fri, 24 Apr 2015 14:49:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755076AbbDXOtM (ORCPT ); Fri, 24 Apr 2015 10:49:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57057 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755901AbbDXOtH (ORCPT ); Fri, 24 Apr 2015 10:49:07 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3OEn6xZ029772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Apr 2015 10:49:06 -0400 Received: from shalem.localdomain.com (vpn1-5-210.ams2.redhat.com [10.36.5.210]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3OEmv85031625; Fri, 24 Apr 2015 10:49:04 -0400 From: Hans de Goede To: Dmitry Torokhov Cc: Peter Hutterer , Benjamin Tissoires , linux-input@vger.kernel.org, Hans de Goede Subject: [PATCH 5/7] alps: Do not use input-mt finger tracking for semi-mt devices Date: Fri, 24 Apr 2015 16:48:54 +0200 Message-Id: <1429886936-24587-6-git-send-email-hdegoede@redhat.com> In-Reply-To: <1429886936-24587-1-git-send-email-hdegoede@redhat.com> References: <1429886936-24587-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 With the recent process_bitmap() changes all semi-mt devices always report the first finger down in slot 0, so stop using input-mt finger tracking for these. Signed-off-by: Hans de Goede --- drivers/input/mouse/alps.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 604dea3..11fda20 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -532,7 +532,11 @@ static void alps_report_semi_mt_data(struct psmouse *psmouse, int fingers) priv->second_touch = -1; } - alps_report_mt_data(psmouse, (fingers <= 2) ? fingers : 2); + if (fingers >= 1) + alps_set_slot(dev, 0, f->mt[0].x, f->mt[0].y); + if (fingers >= 2) + alps_set_slot(dev, 1, f->mt[1].x, f->mt[1].y); + input_mt_sync_frame(dev); input_mt_report_finger_count(dev, fingers); @@ -2835,7 +2839,7 @@ static void alps_set_abs_params_mt(struct alps_data *priv, input_mt_init_slots(dev1, MAX_TOUCHES, INPUT_MT_POINTER | INPUT_MT_DROP_UNUSED | - INPUT_MT_TRACK | INPUT_MT_SEMI_MT); + INPUT_MT_SEMI_MT); } static void alps_set_abs_params_v7(struct alps_data *priv,