From patchwork Sat Feb 17 19:56:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 202687 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp484836dyc; Sat, 17 Feb 2024 11:56:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVr0OEMybvMs8mO0vp/qK9CcceLFNAIY6dZ0ZXizku/Zefe5/CWolixfRfn9oZG0CrIL9SLogubLnAIvET39A8Vc7pH0w== X-Google-Smtp-Source: AGHT+IHQKEofQ2KCmcssJc/KZeJTzNPX6noCxcbDF8SG/eZjPVXzCp50F4CDySCLYyua5IF5x0+2 X-Received: by 2002:a05:6a20:9f49:b0:19e:cea1:54a6 with SMTP id ml9-20020a056a209f4900b0019ecea154a6mr12341049pzb.49.1708199793540; Sat, 17 Feb 2024 11:56:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708199793; cv=pass; d=google.com; s=arc-20160816; b=s9NShx6tv9fjSFoL5Xu8HCNa2H17Zsj84KyNW31rutig6MKDVaoELz/XcDB/rzRbBv heIaDfHRyC9m/fdfqv70pYjC07Grq3aJqSV25V1yxRq1/tiQ7ZgN8WP9EB+q9FIV++bZ 1TQMWv0TDTshswGxvEKLlBI5CxJPsrf6BWXH8qh8sPTzEHwY6Txkdz6XqtRs3pYWIrNZ PopRQTR4SA7dH12VuaU9Tq4c821xp3SQ2/D2XchWteuSzSyIZp0YIhMtiMNrtV+M0uDR gBEGAm8csVSWH/sj//frI4RJwsnF+JfaL/VRXRytGasEzY8q7jg+PSWsNbEab54IZigh 01lw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ovoV7VQ36/cUPfD189BNiMR6GK5vbPczmdalwthzEE8=; fh=TPc6Y2rI8MpZQ6HKGPuLWUffWpaBRQOIFzmWU+A6lMw=; b=aCa8WWa9WKPzBiw7GpWXUfuhD2H70n6Ege12G3T9BlBE2bj9GuHXxC11kI30eotUKR 4inMsNqg6QavuAlnyoPM67lq08nWQXyRcKQFkqLtlyQwSVA4Vp0q73UOAGaYuQSGUVtl 3z3Bl6OZc8sikiacch3gpesd2bidLbUfxwCS7yFzs8Gr5tkv+5CRpd/RtvnubyFt5QnF OF/9yqr0JIWP9xG12eLJtFFaatZ+gTwD8IzbK0S7ltggWbjiIKuuhZ6RX0DnxmXcoykC VT4+qvutqyEpeCz/dJU07dx6t6ziar92FznjGN9zDU+HscUHPDrIbThfPaNY+eTA59Cp lwqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=NBdjA8Hq; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-70043-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70043-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x93-20020a17090a6c6600b002991777134bsi1988499pjj.38.2024.02.17.11.56.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 11:56:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70043-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=NBdjA8Hq; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-70043-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70043-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D685281D66 for ; Sat, 17 Feb 2024 19:56:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9DFB7E59B; Sat, 17 Feb 2024 19:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="NBdjA8Hq" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 657CE1C2AD for ; Sat, 17 Feb 2024 19:56:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.181.215.36 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708199780; cv=none; b=lMFtRmIaUNt+93yPfLWvFqxl34nXbeRIptDtk/EMgk755eCWOwfdW89vtu6X5DfmBccf1XhwQQ7zz98uZSRb3JaeH/nU8VogqLQbfI7Y/sAav2LS6fhlZIsf/iafvYGYYcIS4SguwAMUIWZg/b2ENBRRwfvLbPUO7ah8dh6BYlI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708199780; c=relaxed/simple; bh=zlqXtG8c8kfCV6iFFNXHOEa/hykqAwBZgah3P9cL9qs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UJyDcx8PGuHMgnXajGwYBX8dCdesvzci2xp/mGZ6H0sykkHilbHmcmIirWwOfM1TId76d7coHcVZ5uDRTxWYaIlCfZkDELdb2TugiCTkHfYTtQBQqruGrzxuvuKwPC4tJWYwzWE+qgYhoZeJlLLI5CmHDb/Gkj4p7NsAB3jdImA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz; spf=pass smtp.mailfrom=xff.cz; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b=NBdjA8Hq; arc=none smtp.client-ip=195.181.215.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1708199776; bh=zlqXtG8c8kfCV6iFFNXHOEa/hykqAwBZgah3P9cL9qs=; h=From:To:Cc:Subject:Date:From; b=NBdjA8Hq7hFOJ5lnbVc57ln97qz/IIqeRJMu60llLulfrpuRUwYzlkXoaBrw7vKP0 KYNCDm+d/UBGakRzpK8wp+41E2kmnBn+/eTjLt5d5+Yik8E/Ww8R7ERByO7QpyklDj 7wW/pkRodpUbneQGgRpAA7qYevsMi/3U7su6AJjk= From: =?utf-8?q?Ond=C5=99ej_Jirman?= To: linux-kernel@vger.kernel.org Cc: Ondrej Jirman , Lee Jones Subject: [RESEND PATCH] mfd: rk8xx-core: Fix interrupt processing order for power key button Date: Sat, 17 Feb 2024 20:56:13 +0100 Message-ID: <20240217195615.1767907-1-megi@xff.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791177229845014127 X-GMAIL-MSGID: 1791177306722807782 From: Ondrej Jirman Process rise event last, to avoid stuck keys when multiple interrupts are coalesced. This can happen typically when resuming from suspend via power key press and holding the power button for a bit too short, so that RISE an FALL IRQ flags are set before any interrupt routine has a chance to run. Input subsystem will interpret it as holding down a power key for a long time, which leads to unintended initiation of shutdown UI on some OSes. Signed-off-by: Ondrej Jirman --- Sorry, resent without the bogous patch series numbering. drivers/mfd/rk8xx-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c index b1ffc3b9e2be..e2261b68b844 100644 --- a/drivers/mfd/rk8xx-core.c +++ b/drivers/mfd/rk8xx-core.c @@ -43,8 +43,8 @@ static struct resource rk806_pwrkey_resources[] = { }; static const struct resource rk817_pwrkey_resources[] = { - DEFINE_RES_IRQ(RK817_IRQ_PWRON_RISE), DEFINE_RES_IRQ(RK817_IRQ_PWRON_FALL), + DEFINE_RES_IRQ(RK817_IRQ_PWRON_RISE), }; static const struct resource rk817_charger_resources[] = {