Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp357075imi; Thu, 21 Jul 2022 02:15:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ta87iXkbBFUzmv0Dbst6uiE0liqU3srunAEN2DSXP+1HyQMRJqNc9TrL4vPT++Mq6SGppk X-Received: by 2002:a17:902:ce86:b0:16c:8a4e:746a with SMTP id f6-20020a170902ce8600b0016c8a4e746amr40237451plg.168.1658394928188; Thu, 21 Jul 2022 02:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658394928; cv=none; d=google.com; s=arc-20160816; b=H0VkSaqAc7VN9wAiGXrJ5W6Z1sHtc0hvOkZipOsnAbeuGfvnlvR2gS8tanlXhy9Ct1 HZdYA9QfCn6LXrvV0ULigk2laaM46H22uEWARzDdybF0lKp/F+9TZucMknbNzKl0g9zD gkpknB20QqOGwYqfOFfKdVlwEZr7VF4QYP+A4FeFfrT1UZO37/MTrUuUXVxeSlTBzI1c pLEseo32G4eSSY2v0oZgr0pvh4+TtsjgXS41kW5TTZoeBiawWB2Hm+K56f6tWR611LwA bIz6BsxFlWPaLKeLTtBxSc/Dp1KuYpe67PMo28F0G0dcFOjp81Uu3ydkZYYmWaeRkciv HOJQ== 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=RvTENT5xSyy0ijIwbWoWfUl2/niyognFDvyPsxPf/auO0MbTNLtoiL7YpVU1rHsEXp h6ePNXUdaNjykJGciCz1L+Rv6UGOjN4+EWUEsgZTqnKoHF4qFs2VQvumXRWNUf9xehxP p7gpRuNAjXgDHrT9xkcIOr4z8gq9yudPyb5aRyZj4GxP+qMz9ICkxFf5RDRVKHFkyaFB QwheT0Qe5e/E7iP1biz7cH+6L3+6R47CSW7HeZIdXK7f2zmlDVEmeRfHERP4/HhyDESc e8Sr5a8YWV32xhgtMBgJMc3EXWVlNPIF57jIXNSV/AUo83TeX+Qhzw2z8+ja1C+G2TVf OQFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b="FQ/8T24n"; 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 lr4-20020a17090b4b8400b001ef826b9223si1731067pjb.153.2022.07.21.02.15.13; Thu, 21 Jul 2022 02:15: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="FQ/8T24n"; 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 S232318AbiGUIgg (ORCPT + 99 others); Thu, 21 Jul 2022 04:36:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232345AbiGUIg2 (ORCPT ); Thu, 21 Jul 2022 04:36:28 -0400 Received: from smtpcmd02101.aruba.it (smtpcmd02101.aruba.it [62.149.158.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 898233A486 for ; Thu, 21 Jul 2022 01:36:23 -0700 (PDT) Received: from asem-TANK-H61.asem.intra ([151.1.184.193]) by Aruba Outgoing Smtp with ESMTPSA id ERe9oJVIEtk1HEReRojXy2; Thu, 21 Jul 2022 10:35:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1658392522; bh=d3ojLOveqXbmSiZO4Qo5C01LjgUH9rwc4A6+CEo+xVo=; h=From:To:Subject:Date:MIME-Version; b=FQ/8T24nFLJ7wl2q868J8AckjLWYO0PHwwRxM++IGFwqfsZVNkNfbePCH+lX1MwBG urnxGBw6BkH2aYwh5Dp7e0Nq/YgNvB9CcbfN0VbaDDkVXg3dNJC9uLh+YFgp8vgKqc bRsjdLm6AD0Xuh1yacCaMG852k/hA0ilqEYFQZ8W2uLAqYLqVwm5nOjnRUtVRYOg4R i2Cpf8k7gnhQz28VsJdUTl+8pR3DaTEfZ4GSO9U7OdRX73FODY9P+10j6uEgApxsuP 0A2v8BnrFL4T7KZaEIRLiseq3Cfw1qrR95Cip3GCQHAdqiEQ1l7pSAUKdEqpSCz3Kr pEQQ9w+nWwOVQ== 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 v2 3/3] ads7846: don't check penirq immediately for 7845 Date: Thu, 21 Jul 2022 10:34:58 +0200 Message-Id: <20220721083458.6412-4-luca.ellero@brickedbrain.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220721083458.6412-1-luca.ellero@brickedbrain.com> References: <20220721083458.6412-1-luca.ellero@brickedbrain.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfFbdTgu8oX/OZAFfyhgjeweFgExsOWhbkk4p92LNQsdkO1lpmrlOwkJxIz3lfVBUyr7aPxpcaWaAkJ7ExQ0POBk0gtz+oEhGquM92q/1R0/8WWmUQRPU 7GrCa7XoLa0RaWyuUxfueDzLeracnhE+LwqBcc9ddzbVRalbVP706cBymI2tizvoGpNB84P5IdRMPf+q0ddZ0ZVweKt2BBRBVcHKLOGnJjZH0pInqdabL+TP oLr4DcUtirIOJNoOBMCC1IqK8S5Qer850cbxEqZoBKfPMrEtgYe1ZXqrUyg8RBG5e6M1lkrf3MTxXhUd4mOnT9/bO/i0ncrI4unNa2k47Tri4XrxVNP2jHgP 3ZAJ61TjDMCx+vos8s7g75OiWXJsCZ/rlNJ+my/GkhbGxQQVy3cpLkMxnTZbz/igMbsUammXXcQTFGuvsViD8G2TGw805uydgGwlhm9oIj+dynNc/RXbvk6i TGzwyrpdlYxjgyJGQUPwtYcyqFb5fa7iUBrLbFBql/c0hpLm+3Omv2Jl9KFxCkDjjzMSdDCc68yfXnH2Cw9QnfyURXJEnkDH/IAVZgtKwB4iQKFCAKOAbk// aXA= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS 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