From patchwork Tue Sep 27 05:04:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masaki Ota <012nexus@gmail.com> X-Patchwork-Id: 9351487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 690C9600CB for ; Tue, 27 Sep 2016 05:04:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5620328FD4 for ; Tue, 27 Sep 2016 05:04:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4944928FDD; Tue, 27 Sep 2016 05:04:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,FROM_STARTS_WITH_NUMS,RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A470B28FD4 for ; Tue, 27 Sep 2016 05:04:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751953AbcI0FEo (ORCPT ); Tue, 27 Sep 2016 01:04:44 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33060 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbcI0FEn (ORCPT ); Tue, 27 Sep 2016 01:04:43 -0400 Received: by mail-pf0-f194.google.com with SMTP id q2so196883pfj.0; Mon, 26 Sep 2016 22:04:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=vGZWSuJXNg8Jjf0wy5NOFpXm6/ARyTWZTW1AahYmm1c=; b=o8n9VcoZBd6MhLucOlqpwzyyapGv/KPTIVycjT3gnahKgdnmHwsrqT6+WwHaob7JXZ xl0FtjheK6wGApO/aZGSjg/CpGjsyLC5FMfy9Zm7datukezY2CO4BjikJs+VPzJ8kPC6 HnWjMhBKdUw3GR1BSUipI+0aW/rqfg8EwEmslRNyBzBe2Xi3EGt4MruPBLoFG5T45oo9 UIxrrMXYD4WIsJZ9MNTr6T1kW66n5rIzKuP02uDmw5z+kf+XyWWK/Dm+j4VlSUUNsK/t m400gTKyzcByK9HmEFvZ2N1tYEAqYkN78Ue1j+iR50ysFA9VmDCiM0Z4fXuY5yKGlZ+f /4+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vGZWSuJXNg8Jjf0wy5NOFpXm6/ARyTWZTW1AahYmm1c=; b=STq+TLIchPok3UMvjNMuG6KTc3TAP9pzd3rr26are8FYXIXbvhlUNBGgvVr/xUBD8X WnN1FkbYrFhfhZd9vYVmqJv2KrIFg1GjNRlhKgKWNjtGuEZY6zE8zxMab4+U/dpBw/IN m4d9uGDDymdTd2PcQw5LJbbO7lBELjfUoXkw/52E9TYYD7Tn3zlCupCjopYZxCdlKRqR E1F1NNAccBlPP6d5bXPfwf0fV9pVlwAT9qczxSvlEnwrExm60QDE9YNROpA7rv90kr7w yFBWQ39xlgFkfiNgnd7bnJX4vpr/5clLj52e2icQVj92P2okfmTFZjVtr4y9lyVtF4xn hfYw== X-Gm-Message-State: AE9vXwOnOMCy/43W+CrOFoscaBgPCX1STTUeEQaux144320q+gjiez1+0NUb6zV9UAtALw== X-Received: by 10.98.19.26 with SMTP id b26mr45572596pfj.1.1474952682776; Mon, 26 Sep 2016 22:04:42 -0700 (PDT) Received: from localhost (p1117-ipad304aobadori.miyagi.ocn.ne.jp. [123.216.80.117]) by smtp.gmail.com with ESMTPSA id n7sm804133pfg.45.2016.09.26.22.04.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2016 22:04:42 -0700 (PDT) From: Masaki Ota <012nexus@gmail.com> X-Google-Original-From: Masaki Ota To: jikos@kernel.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kai.heng.feng@canonical.com, masaki.ota@jp.alps.com Subject: [PATCH] Fix a issue that Alps Touchpad cursor does not work Date: Tue, 27 Sep 2016 14:04:37 +0900 Message-Id: <1474952677-22887-1-git-send-email-masaki.ota@jp.alps.com> X-Mailer: git-send-email 2.7.4 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fix Touchpad cursor does not work after touching Touchpad by 3 or more fingers. Issue reproduction procedure 1.Three or more fingers put on Touchpad. 2.release fingers from Touchpad. 3.move the cursor by one finger. 4.the cursor does not move. Cause This code does not notify multi fingers state correctly to system. For example, when three fingers release from Touchpad, fingers state is 3 -> 0. It needs to notify first, second and third finger's releasing state. But this code does not notify second and third finger's releasing state by "break" code. Solution Delete "break" code, and move xyz input code to the correct place. Signed-off-by: Masaki Ota --- drivers/hid/hid-alps.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index 048befd..610df92 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -190,16 +190,16 @@ static int alps_raw_event(struct hid_device *hdev, if (z != 0) { input_mt_report_slot_state(hdata->input, MT_TOOL_FINGER, 1); + input_report_abs(hdata->input, + ABS_MT_POSITION_X, x); + input_report_abs(hdata->input, + ABS_MT_POSITION_Y, y); + input_report_abs(hdata->input, + ABS_MT_PRESSURE, z); } else { input_mt_report_slot_state(hdata->input, MT_TOOL_FINGER, 0); - break; } - - input_report_abs(hdata->input, ABS_MT_POSITION_X, x); - input_report_abs(hdata->input, ABS_MT_POSITION_Y, y); - input_report_abs(hdata->input, ABS_MT_PRESSURE, z); - } input_mt_sync_frame(hdata->input);