From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f52.google.com (mail-dl1-f52.google.com [74.125.82.52]) (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 EF6B42989B5 for ; Mon, 6 Apr 2026 18:18:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775499509; cv=none; b=XZ31xtpA4Fd5hgtGK0X/fLDV81KkYpLxwi7Rz/5/6Q8yZYhMiw+iNyJhFVmTnxkjpR9a/9lB0WQRQU8JPOsxAF3yWgi5JAW1gjxq7zA+sKKPDVFQPrsUY9QJ1XJ17YHHPreq/M7zdwCIpFczvjqdpJaRoWW2mPsB2oB3pVxyfvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775499509; c=relaxed/simple; bh=GR1sNINO/RUqMYk1EFcM5BXaUzE/t5ecsmgjyUVxapk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VhPycqQd/SpF2A5ZXFIoCKatcPP1sXxM1FJUUoHDzNeCf+5luofhvkGWUqQ8EOibcGcHiSprQgtJlFoT9UQpc5FC4N8vYYS8rjUk230XIZX5cnREiGw3q5aTgRdS5ZUJcCEqiEb1KXb9zwPg7BAo+mxTV3dAOer7ISk/iB6vsgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=clUk9wH2; arc=none smtp.client-ip=74.125.82.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="clUk9wH2" Received: by mail-dl1-f52.google.com with SMTP id a92af1059eb24-128e4d0cc48so4302811c88.1 for ; Mon, 06 Apr 2026 11:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775499507; x=1776104307; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NfZeHT0ZLthLEJsbk1CZtexgkzwdO4FBprTiGJKUEHU=; b=clUk9wH2ddwcvEF9fseopqi8wpjF7hsS4mrRIamHTO3grPArFqh4RzMiR48OOy/zkF 6X7bdWQIkKncHBDwDX6VyIHiEr5g3WHHBWIKbH8WFkv4h51TXYN2iHz91R6Cy4yXOG05 r9wXnUhfhf9UXSDAhBu6pNXHAiQT55VRTfyOSRworJ62M6aL4XRUmVh1eAkB38XoPCXZ Y/t3TKUym/Qcube2XDxT/FXltrXmZ00qYu2mncaJea//rklDTR6t0YbLzQy2AOsoNzR7 rTN3X0pviNlj18W75f2UwrZtVyoZkpmJ5U6AdkBksbgrhy+2gzC033E4BcWc1F3tmIJX qmfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775499507; x=1776104307; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NfZeHT0ZLthLEJsbk1CZtexgkzwdO4FBprTiGJKUEHU=; b=tKE0EDDz6AfcxnlOyLl7y0vX4ZNC5x1P34VCNBK6WOtWYYi6NMpSa7SD2DI6/SG7ia gZ3ns9B3hRJyMVlU9IIVdd3f9KZ8O0pc/FNCCwzQGVIeUNsea+UKBLaySLgzjmE0O1d8 HDmBlswJABeMd36Vb5XCGjFs+CvlwnT07qeFrtKOQCFcYCeXLrTxw6GZZn96ZAowVtCH RFiXA9sUOF/RIfKLu6nl0TJxS8BD9bQ7xrz8JB1lnO8D+gss7J/masjLSQw2d57s5/Ih LPS74s+OD8BqmgwVX1anseD41PGgo/XwTQfAYpMUM/vFGkQ4I3gxXhkXIvz8JrJ0Q5mn qSCg== X-Forwarded-Encrypted: i=1; AJvYcCUE0m9pAWNv8s2UDN4Lds2FkOid6XpWJKGSakjQ6EV4sdrfOuy3tCsI0vCACy+yKg+S7zqFjVw50IBqRP0=@vger.kernel.org X-Gm-Message-State: AOJu0Yy5TB2CY6OUYB0CFW6RSmwPZ03i0JhcGYA5a8/vXwij+hRTRa0v YsaD/Kcoc9v5aib3Lq/AzkNVsJSNG8LJ0RaiCak2HYzLC3yHQQCbIa7q X-Gm-Gg: AeBDieueWhChVPun/UCYELpYTh0309A5uHSlS1TrK5CrhRX/ZmG7gcYMVI5K3rj9BL+ dTgKX6LIKwcyv8OA5WwTmKu0vBu+KSyY407RjzxkK6Qm5BoeIZ+myMFIpV3PdF2Q91XnKCVFcO3 3g2bkQBVyLKmduMuStVPkybF+2+egiMZ/QLrjQ5S4AUil8JhYZPNyJ42PNBwrpUtSkbQm2TJvnB lXUb7mdocwdQoTBZQAmoIle5Kfd4PPeOHQfmNKSOzH+NlnNo5/lHM0wgSvAcHz/b9sO5RKWLTZ+ XmtvaeE1lf8LWW3JcYVa2df827Mx7jIIPtTs1cq+YhP1Wa1m4uSvnnb+NnzNwHzv+2zCwY/1OjF 5Fkcsv97PwINrjX5aNpxEU1HFP/TphfEaMjF1yQ6hXFkdlB32hHdCnhYO2wvoaQYoTX3/sMGvND w5BOSLT25FHYIJaI/578XHJrugnolZXa5xrp+pnArZ7Mhdyo26h90yEQL+tdomrwDw X-Received: by 2002:a05:7022:212:b0:11a:fb3c:568b with SMTP id a92af1059eb24-12bfb744257mr6269320c88.17.1775499506972; Mon, 06 Apr 2026 11:18:26 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:dd71:7176:b4e4:a7a5]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12bedd4e4e3sm11128775c88.1.2026.04.06.11.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 11:18:26 -0700 (PDT) Date: Mon, 6 Apr 2026 11:18:23 -0700 From: Dmitry Torokhov To: Armando De Leon Cc: Armando De Leon , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: gpio-keys - add hibernation support Message-ID: References: <20260406160437.3084755-1-learmand@amazon.com> <20260406165833.3137128-1-learmand@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260406165833.3137128-1-learmand@amazon.com> On Mon, Apr 06, 2026 at 09:58:06AM -0700, Armando De Leon wrote: > Hi Dmitry, > > Thank you for the review. > > The interrupt controller (GICv3) is re-initialized by platform > firmware during hibernate restore - this is expected behavior, not > a bug. The IRQ trigger type (EDGE_BOTH) was originally configured > by devm_request_any_context_irq() during probe(), which does not > run again after hibernate restore. > > The TLMM/pinctrl registers are correctly saved and restored by the > platform's syscore_ops - I verified this with register dumps. The > issue is specifically that the IRQ trigger type configured at the > GIC level during probe is lost and not re-applied. > > Should the generic IRQ core be responsible for restoring trigger > types across hibernate? Otherwise, consumer drivers like gpio-keys need to handle > this in their .restore callback. I am not sure if it is job of IRQ core vs. particular interrupt controller, but they should restore the trigger types along with entirety of the interrupts and pins states to exactly the same condition that they were before entering hibernation. > > Either way, gpio-keys currently lacks .freeze/.restore callbacks > entirely, which is needed for proper hibernation support. Drivers only need dedicated freeze and restore handlers if the behavior should be different between suspend-to-ram vs suspend-to-disk. For the vast majority of the drivers they behave exactly the same and I do not see why it would be different for gpio-keys. Thanks. -- Dmitry