Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp365951rdb; Sat, 17 Feb 2024 11:56:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXMOxwVUSfonaPETgfyF4LHmU0xr0wGRPkvhH+R0wOmrU3MtBz4K3qHoGoF/+0+LiyDaddoIJhtUyFxdS0O+E4dARikUC3l4ek735SYYg== X-Google-Smtp-Source: AGHT+IFT1VLONUP4vgjbANd074QOcPnw2MhBCvDdxycaHCRqjJldPKK4naLdf8PO2OswItfjyNNm X-Received: by 2002:a05:6a20:2d2b:b0:19e:985c:c019 with SMTP id g43-20020a056a202d2b00b0019e985cc019mr12240831pzl.47.1708199786515; Sat, 17 Feb 2024 11:56:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708199786; cv=pass; d=google.com; s=arc-20160816; b=pbb3LDRDYNU9h4uYWIN9Ogvw85LuANM3mc3IOlFBklJHvy+URAf9ty0xPHDpCsgM70 K0SAvJybKWsrpcyrsjxtRUZfAwPY2Uag0MKD4TOCQBdNdsqHfpdIaMvAfLv+IYWBQuGJ KCovr3v2U51RsoYR2zSnGkG17VIwh0qIciLE5DSKUGIWtlq8Du9v72xhgk9/BOfRLXTf Js2hmzp8ZTOIR9Y7WUntzi5Gj77vkU2SXkBlOaPp99LagwSYYv2aKxssuo2wUl0eqzoO PV8eOiVym7V8czZLb0Fky81ThbSa9Oei8yu4NjEgvhpwSe/MnBb319LmWhIT6RCX9CnF rTxg== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70043-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z126-20020a633384000000b005dc958db2ffsi1861731pgz.470.2024.02.17.11.56.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 11:56:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70043-linux.lists.archive=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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70043-linux.lists.archive=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 38516281D66 for ; Sat, 17 Feb 2024 19:56:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 296077E589; Sat, 17 Feb 2024 19:56:21 +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=20Jirman?= 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 Content-Transfer-Encoding: 8bit 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[] = { -- 2.43.0