Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp347615imw; Thu, 14 Jul 2022 02:25:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sbAvjoS1stvS4sfJ3Z3DHHpOKocdMvk1da/+vZmC9wk+xRznLmnP31odOXaSu4qZJML06H X-Received: by 2002:a05:6402:42d3:b0:435:2c49:313d with SMTP id i19-20020a05640242d300b004352c49313dmr10808269edc.86.1657790728791; Thu, 14 Jul 2022 02:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657790728; cv=none; d=google.com; s=arc-20160816; b=VFxKBKRRA5tTWbDEXsXtvU8bCDsYsMp7mQTCow389nHu+Q+TKEt36EIXoMkFsWI/X/ 0O6MQrMFyLiVkARCfUeUbQRBsu+18At9oOz3TERnD8JlpXIY+5Fjbxq90C1BU0ic0aOK x8FwWbv+tedMPFRQxa4myNtOoVR84InCbQHzwnZ1LbWCakT4vyCOIgyi3S4RkFUlsgkZ xWm6X6tltQIbiO2Pa4VzrkDa7XsifOMe6Nr1fc2+vkk2nuFHRj45n7ego2v4cQC2ioJe GI2R1K1E/0vJxSK5oiKZOUuJyfFli8GT5SdI+7NqxcYZG0xXMcwLcCC8tzCtT/voxtxC dsUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GVxOzdkPeVn7qSrGulB195qUIUFA76jf4BIG/GsCXUY=; b=LXQAhapYzVPdTVS1RE750nWES9WrHPtj2J//9I50ri6c13XnYwplQmmony+1YaG0v6 5W16R9p3yrY8SYFQtysdMd9pyB23a9CINtefovyiDhEUmlw5fGZw1R7FXC7lEz96ocot oVPuwXUVYrYW4hyf30U+MmeRqTX0LBmEsng5/JWwxtICY+9ic0xgSZmXWfQ/X3M78Eyt /65W3UkuW+V0bhIwXdUhT/CQaMS+NEsTLDPXKSk8H4GVylW4ScGEOJVrrZHZkW++yhEZ XXWw+PD5S2sh8O/vUhW+IuyhtEKOTZvO3FXIuN8nGhVq8XpD+toCw4JkfSGQH8InZvWg AzkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=BDA35mUC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq10-20020a1709073f0a00b0072b3b4f016bsi1960868ejc.628.2022.07.14.02.25.04; Thu, 14 Jul 2022 02:25:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=BDA35mUC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237367AbiGNIpS (ORCPT + 99 others); Thu, 14 Jul 2022 04:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236882AbiGNIpL (ORCPT ); Thu, 14 Jul 2022 04:45:11 -0400 Received: from smtpdh19-2.aruba.it (smtpdh19-2.aruba.it [62.149.155.149]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 02DA63DBDD for ; Thu, 14 Jul 2022 01:45:09 -0700 (PDT) Received: from asem-TANK-H61.asem.intra ([151.1.184.193]) by Aruba Outgoing Smtp with ESMTPSA id BuRhoA7r5bvrcBuS8oFpnK; Thu, 14 Jul 2022 10:44:08 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1657788248; bh=d3ojLOveqXbmSiZO4Qo5C01LjgUH9rwc4A6+CEo+xVo=; h=From:To:Subject:Date:MIME-Version; b=BDA35mUCYAOivdxGzqV/T/0H+XWBYihh2F6mgussmoQJEmxINxaJS0IwGr9h66oXQ 4gKGq+wbeMUaMMDj7XpnX6C/GcHoutpDSvxEumct9bmw4ibNBUuY1MEMLWuN0LXlxS VebVTNqXk7t5e7RFzZ54hIRcsTDMqM4EcMm6+Jgh2LXvDW0MO99v5C41pUcUd7nZL4 9888QF/rU75d4nIR6Vph8K1kizcpvEzgG6dd9oGMI2JupN5XQqYY7qhllEp/y0d+mN ZxDNyuuwuo3Uwf1qaodT2FTiy6dKt/pF3xkEX2iu06+d5DVBELeTFWnZ7UmynKL9KK LJh6r9rW8TsSA== From: Luca Ellero To: dmitry.torokhov@gmail.com, daniel@zonque.org, m.felsch@pengutronix.de, andriy.shevchenko@linux.intel.com, u.kleine-koenig@pengutronix.de, mkl@pengutronix.de, miquel.raynal@bootlin.com, imre.deak@nokia.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ellero Subject: [PATCH 3/3] ads7846: don't check penirq immediately for 7845 Date: Thu, 14 Jul 2022 10:43:19 +0200 Message-Id: <20220714084319.107334-4-luca.ellero@brickedbrain.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220714084319.107334-1-luca.ellero@brickedbrain.com> References: <20220714084319.107334-1-luca.ellero@brickedbrain.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfJzV9VCatr6RG2B2PnZzh7ZVU62HDO+BSCRsFLg8V8lw84wpBMsJR6K5ZcTIa797byu74rOs/wRk/H7d82GMTODnvJRcbbPJrttHVhgfmtXH/n0wzWo3 hoWVK3gLd753yUrHpdQXgc8dp1zXhwIo8QsbCfQNsAvXNDj3WNEWPKrHgGyxDzLHDiM5lDNWeI4WHqx+FNVLwN1gVfJpcu/Ua1zGZfyOOErB0yOpJhlXkkHS lOiYZH+4GECM2KU5RGjji+qfwcWgkS6EyuYpQhPhCb1+GDe82It0nTL5pwov5rC3BUle4tJZ05C207UTju+1Y+cKLMAa19xuosY6TLKXQXvzqEv4zKCFw6Ux yk222vF3z2Woh51lUXFjH3s5B1wya4kRJVK9y/jzJ6f0m6RIRIp75tVYeE9XMS+fQ3ohbGp/mGiQ/qDwPOrXkYbUR4ITvJtCDdN0WoLj4ZYyn91xRjz+q5yb eBSLENMVmFLJ0S9zivlWSKvKLVmynOgAGQgn1TUMbFrCV3k/0riYjr9RyL3IUydVJ1IbtrlIUdXZgf/M3dgq6p9HmtxtvykGqr/X2WoxU4lNJzoqGx7X3+Tg fKE= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luca Ellero To discard false readings, one should use "ti,penirq-recheck-delay-usecs". Checking get_pendown_state() at the beginning, most of the time fails causing malfunctioning. Signed-off-by: Luca Ellero --- drivers/input/touchscreen/ads7846.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 9e15cdf6faa0..122d3a13b7c5 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -843,14 +843,8 @@ static void ads7846_report_state(struct ads7846 *ts) if (x == MAX_12BIT) x = 0; - if (ts->model == 7843) { + if (ts->model == 7843 || ts->model == 7845) { Rt = ts->pressure_max / 2; - } else if (ts->model == 7845) { - if (get_pendown_state(ts)) - Rt = ts->pressure_max / 2; - else - Rt = 0; - dev_vdbg(&ts->spi->dev, "x/y: %d/%d, PD %d\n", x, y, Rt); } else if (likely(x && z1)) { /* compute touch pressure resistance using equation #2 */ Rt = z2; -- 2.25.1