From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B452D13B2B3; Tue, 27 Feb 2024 14:06:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709042781; cv=none; b=BEaUFwYY8+1BlvRkcmMvL5Z3wB7xuvJXMySLFeoZuQSgspHMJpH3pL6GEoyRIXLgSNPHhb897wDCXwMcwubj1Kf0cn1HBhl+baUOwFRC1o0WAiu97hx8o5S7GUFEzsD52guiqgYwx/W4Nwzkk+pN9hvoP6iIhHocs51+OtnlA8M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709042781; c=relaxed/simple; bh=Z0C7FwkHrg1FU6vasdlmJp/9mTLvSLRE79lt7CSfhi0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CdAbDKzsBf76jw9gOfhuV9ZNKpWGrA1GdSddQHm5d5k9k6kAJQPnyqRqFLYKtdeor1XyY7yChUQu495UTltTGRQiPZb/9+nfUNR3A0W99vLatKPF61S+6v+RN9WvjBikSx6MHTGm+s0PtKmhDvWHC4VSTli6TsoDni309MJk050= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=y9dW2kO2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="y9dW2kO2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4437DC433C7; Tue, 27 Feb 2024 14:06:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709042781; bh=Z0C7FwkHrg1FU6vasdlmJp/9mTLvSLRE79lt7CSfhi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y9dW2kO2A8WWZSb1B2LT0L5zfs22C3pCtLiPWZUbpdHvnE5MIr4j06OuICyLe7sUC WFnDVB93maNh9SNHeh53qp+rUX3JV24o9WlAFw9offjsyudBitj5kwQpCwLczm4dPG QI021IbScmu1JelvulgYwji6yoTPSyol9qqcamBA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Luca Ellero , Andy Shevchenko , Dmitry Torokhov , Sasha Levin Subject: [PATCH 5.15 118/245] Input: ads7846 - dont check penirq immediately for 7845 Date: Tue, 27 Feb 2024 14:25:06 +0100 Message-ID: <20240227131619.064415009@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240227131615.098467438@linuxfoundation.org> References: <20240227131615.098467438@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luca Ellero [ Upstream commit fa9f4275b20ec7b2a8fb05c66362d10b36f9efec ] 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. Fixes: ffa458c1bd9b ("spi: ads7846 driver") Signed-off-by: Luca Ellero Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230126105227.47648-4-l.ellero@asem.it Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- 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 f416a4bcd72bf..1db61185f7bec 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -851,14 +851,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.43.0