Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp455949imw; Thu, 14 Jul 2022 04:51:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uxM1YrkWFEvw2F4O0L478e8M9k0H9osnQsy7yOJHaTZ+BWTKLKu27etT9Yf86MMHfbyyTu X-Received: by 2002:a17:902:ef8b:b0:16b:e1fa:eaca with SMTP id iz11-20020a170902ef8b00b0016be1faeacamr8105048plb.111.1657799473824; Thu, 14 Jul 2022 04:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657799473; cv=none; d=google.com; s=arc-20160816; b=I5N6I6pfvimgE/108aCqGveuYgvJCU3+A23EECLRVDq8mLWrcoTNuigLmW0GPSaMYV vUWE2i4wbC3+b34vyaYCKERF4rLUsyAS5x8soux8u4HHJoYqd5m59tAHmGK0cD+Iq68V oNICBbR9+dZPMbYFYwuf1GKqLgFgBl1EEf1BzkNcqSV8ETUEUQpMNpQVdO2P8KQL5iLS A1hKbx1v0MmoVzqxNh7n6q8BUnKXHoQYaPGS8+70v6+tG7xuE4ggdNYd3kGk+uwpguhy KO1ZhdDFtBvyS1ui/GV5rtH+nTgIycKx2X5LNuRrgEg8OCyk96heO0Dcw751pYWLzxV+ draA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1peFpbH8hPhkCjhg5decyjE/IwLFQa5w1zK0AUV/kVE=; b=BkakidbxyGmQo5Kgyno0gfzT4G8Tyx4l8qBm+41DtlOAL2eaMevdgspJhNJCHRUrXA GeXcbW9VT0SPrmwP8aJDcOlMfwQRbzDpaJ1Js87fro74NNYoF9YP1anejc3BHL1D6ZKO k5wlNRFBwRd9accaKMrfvSVeSwfVzCBQRPCI1a5kDvYSHbDA4L/Ce/HRZ4NKSoaOR9yd VWEnCIL/hMytkFP42sa7Qt76J/eV6fPdmPIWbnQwMnAGnMwY+jUm1QxUZl4QvVIq7t3w W9YOM+9JpbzaEB4D+Jw5sF8Sd7t8mZxkGtikl6MZj//C1lKZkllqnEbiwhVVGZSlGDMD XrKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hDdb4nrQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h190-20020a6383c7000000b004199286220dsi1703794pge.25.2022.07.14.04.51.01; Thu, 14 Jul 2022 04:51:13 -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=@intel.com header.s=Intel header.b=hDdb4nrQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238967AbiGNLfg (ORCPT + 99 others); Thu, 14 Jul 2022 07:35:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238965AbiGNLfe (ORCPT ); Thu, 14 Jul 2022 07:35:34 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26B62599FE; Thu, 14 Jul 2022 04:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657798533; x=1689334533; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=DyXB1n5qWup8pCu/YKdjbcr2alBTXtII9082twyRCsM=; b=hDdb4nrQEOYt24tjOm6zXRRmcqoFWdkQv/27gmGsSw2RrfyZ3FAR0wCj nmf7/EBWvkhWJSXqRkNB70Uqkv+TdswYH8NXnE5UjZQX6UBqZ9G2ZxzqE 8pf5+34k+5PQl2RlcHgByN3VhxzqqsQWSQ4rdzjnZqIi5gnGlGP0aBLhU 06jiy6vPEd0uCqxFJm/xey/HlVfht8VwvgY8xoU7IeEGxUzKyaKggtQRu QXrwKr4inzAEd893ot42PcsP/nOqBEJhpdjNYEJbPVZs8k0ApNNiETEer a9HP3L+y24oVYVUmMhwKJxojRce9VnRiIXk2yK5jBJT5DZcKoHjaH6c6y Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10407"; a="286229716" X-IronPort-AV: E=Sophos;i="5.92,271,1650956400"; d="scan'208";a="286229716" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 04:35:32 -0700 X-IronPort-AV: E=Sophos;i="5.92,271,1650956400"; d="scan'208";a="546233797" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 04:35:29 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oBx7u-001DCM-2S; Thu, 14 Jul 2022 14:35:26 +0300 Date: Thu, 14 Jul 2022 14:35:26 +0300 From: Andy Shevchenko To: Luca Ellero Cc: dmitry.torokhov@gmail.com, daniel@zonque.org, m.felsch@pengutronix.de, u.kleine-koenig@pengutronix.de, mkl@pengutronix.de, miquel.raynal@bootlin.com, imre.deak@nokia.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ellero Subject: Re: [PATCH 3/3] ads7846: don't check penirq immediately for 7845 Message-ID: References: <20220714084319.107334-1-luca.ellero@brickedbrain.com> <20220714084319.107334-4-luca.ellero@brickedbrain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220714084319.107334-4-luca.ellero@brickedbrain.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Thu, Jul 14, 2022 at 10:43:19AM +0200, Luca Ellero wrote: > 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. Reviewed-by: Andy Shevchenko > 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 > -- With Best Regards, Andy Shevchenko