From patchwork Fri Jul 20 21:51:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Dyer X-Patchwork-Id: 10538481 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 08C7D6029B for ; Fri, 20 Jul 2018 21:52:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F234929162 for ; Fri, 20 Jul 2018 21:52:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6B0029182; Fri, 20 Jul 2018 21:52:13 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 94BC629162 for ; Fri, 20 Jul 2018 21:52:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731108AbeGTWmV (ORCPT ); Fri, 20 Jul 2018 18:42:21 -0400 Received: from avasout06.plus.net ([212.159.14.18]:48150 "EHLO avasout06.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731420AbeGTWmU (ORCPT ); Fri, 20 Jul 2018 18:42:20 -0400 Received: from hairyalien ([80.229.148.18]) by smtp with SMTP id gdJpfIgPLWLW2gdJqf5XFo; Fri, 20 Jul 2018 22:52:11 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=fJUXI6Se c=1 sm=1 tr=0 a=o7Djd4SkmPXITDn8qH+ssQ==:117 a=o7Djd4SkmPXITDn8qH+ssQ==:17 a=R9QF1RCXAYgA:10 a=V0UhwjhiAAAA:8 a=rmrmLN10yKof2KZZh_oA:9 a=VYi_7EKfSEZBtkSb:21 a=l9GQmagX8nqmyVhH:21 a=CdTG0GUg6pYA:10 a=_UVLBGXn8Au_dgoMdIS7:22 Received: by hairyalien (sSMTP sendmail emulation); Fri, 20 Jul 2018 22:52:09 +0100 From: Nick Dyer To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Chris Healy , Nikita Yushchenko , Lucas Stach , Nick Dyer Subject: [PATCH v1 08/10] Input: atmel_mxt_ts - don't report zero pressure from T9 Date: Fri, 20 Jul 2018 22:51:20 +0100 Message-Id: <20180720215122.23558-8-nick@shmanahar.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180720215122.23558-1-nick@shmanahar.org> References: <20180720215122.23558-1-nick@shmanahar.org> X-CMAE-Envelope: MS4wfArrwff6rAY9vEW9ljHyUw0vkg1GYPgkyC+IWKsXwulvzX35UJiDasqGRKodHmOH+y0z2SuFI3UZP91BY3yftEu0M4pMdd9Zt4+VLUhNg62gW/0RZtlk 0cGk7ryay5J0UP3t+2l1ThfisNgNOtKqvKQ= 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 From: Nick Dyer If T9.CTRL DISAMP is set, then pressure is reported as zero. This means some app layers (eg tslib) will ignore the contact. Signed-off-by: Nick Dyer --- drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 2d1fddafb7f9..d7023d261458 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -843,6 +843,10 @@ static void mxt_proc_t9_message(struct mxt_data *data, u8 *message) mxt_input_sync(data); } + /* if active, pressure must be non-zero */ + if (!amplitude) + amplitude = MXT_PRESSURE_DEFAULT; + /* Touch active */ input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, 1); input_report_abs(input_dev, ABS_MT_POSITION_X, x);