From patchwork Sun Dec 6 11:17:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 338818 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp1956944jai; Sun, 6 Dec 2020 03:46:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkRkQqrDL3gISPEfXRF8ZbfAfyNXIdnYodRpvLcJww5LFXO+tc1uMWVsmAJJu8CtETyWzm X-Received: by 2002:a17:906:ca0b:: with SMTP id jt11mr14238970ejb.538.1607255202855; Sun, 06 Dec 2020 03:46:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255202; cv=none; d=google.com; s=arc-20160816; b=Ftz4JhvjSMOHxaOEDaDZWlgVBPUndWbcvF0wszqOAMbviSS1ialT9lA0xEvlelFsW6 iiB/9BvrhlOf/W7A5G8YSOIXYdj5bGXHsEEqtfgQRIhGs3fifq/6gvN05j0aM970ryO1 n8ljdqoFGnJHljyYVR7GieJq4ZLfqV51L8KnBZkBd8tXKO6IhT7QinxHGUtpMR3QpGOq C9tQNReejrNwdc30/jxFkg1Hv1mjbw0BS5qee0nh3Xb0SMjlihkdAmNiOR+NNsvm5qHU pHiW8jpobzMgfQXe6hQIDbT4Bnd38nq9eqe31ZLVRUrupblWFtZA5fiHwr6UIYQaML4m 1+ng== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=I2Yv/lmG6nge4AaqTox9bz3pdD3vgzQa6dkAL+pIVK8=; b=zLgbmkRpL8AGN8oDCAREVSl/A1fTPApxssQIKMnJCZ8hEwt2DLz2bYeEH7c9BRnpNg TsjufGQ2lp4PCX/4kU4vAEW4n0xpVxFLkkOFqINUQvR/6Bt2hMcyC39WENz6+CaMfIPf 4J0RJUu+v8eecd3ai9GOTTPrO2hvgwJcGlOkD05PQl8mpTZulzwB8T+ApYgfauRBJUAT UpRe802lAJEmLxhP0wVTAQ5ocJdTw3KRnrpYehsnG0T0ZggCAFkOizDQLgPFblLezgbK JP7EuEAZ1onAdpYJtrtnFjCUj3bZhKK8sW/c9vwpOwft3/UQKitcIrkPVGmHg8zhEcJI dH1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k23si4966443ejk.521.2020.12.06.03.46.42; Sun, 06 Dec 2020 03:46:42 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729614AbgLFLqD (ORCPT + 14 others); Sun, 6 Dec 2020 06:46:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:46534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727936AbgLFLqB (ORCPT ); Sun, 6 Dec 2020 06:46:01 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?q?Andre_M=C3=BCller?= , Dmitry Torokhov , Linus Walleij Subject: [PATCH 5.9 42/46] Input: atmel_mxt_ts - fix lost interrupts Date: Sun, 6 Dec 2020 12:17:50 +0100 Message-Id: <20201206111558.487534010@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111556.455533723@linuxfoundation.org> References: <20201206111556.455533723@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Linus Walleij commit 8c3b55a299c325830a987de21dab6a89ecb71164 upstream. After commit 74d905d2d38a devices requiring the workaround for edge triggered interrupts stopped working. The hardware needs the quirk to be used before even proceeding to check if the quirk is needed because mxt_acquire_irq() is called before mxt_check_retrigen() is called and at this point pending IRQs need to be checked, and if the workaround is not active, all interrupts will be lost from this point. Solve this by switching the calls around. Reported-by: Andre Müller Tested-by: Andre Müller Suggested-by: Dmitry Torokhov Fixes: 74d905d2d38a ("Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary") Signed-off-by: Linus Walleij Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201201123026.1416743-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/atmel_mxt_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2183,11 +2183,11 @@ static int mxt_initialize(struct mxt_dat msleep(MXT_FW_RESET_TIME); } - error = mxt_acquire_irq(data); + error = mxt_check_retrigen(data); if (error) return error; - error = mxt_check_retrigen(data); + error = mxt_acquire_irq(data); if (error) return error;