From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (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 EE50A36B046 for ; Wed, 8 Jul 2026 13:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783517433; cv=none; b=XHl2Ht2e5D6bB8/jB9qPMJ2IfRteF9eUjjmFQDOhwyKmis4kT9dbxPNSJc8OLsu4UVMJUhD+rGvagzMenPC/rBnv9g3HN4S0Fo+I6Bm7oYRng2v7Az7ZVTlZqJzRNPf4mF1VLWc9sQUJqgZkTyD3NlKMF41RDGGCTm/+vjgS6ZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783517433; c=relaxed/simple; bh=lRSxxUfUOsOthWc/W0/61ndF+KiOfs3wdc2i157SyDY=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:Cc:To; b=F+J/sZxt//tmEj2Z0cq4hapay4LlyxFK0Z2QrN2CpSri7T23XqueQ4HOJtRA7pkGExntsEdY4IZ3YgQEFKnubG8RurvaqEBLu/enrpSPNlpk0AeBXtif6PGmg7KaHoI3x5On+Z5MFd6Yv0RywAP9aVyzZNw7mjZ7vAw41ohFjhw= 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=bvnUqVCJ; arc=none smtp.client-ip=209.85.208.51 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="bvnUqVCJ" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-6984169c126so1182911a12.1 for ; Wed, 08 Jul 2026 06:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783517428; x=1784122228; darn=vger.kernel.org; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:content-type:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lRSxxUfUOsOthWc/W0/61ndF+KiOfs3wdc2i157SyDY=; b=bvnUqVCJevR7J2y0qftfb/GO6ocLNg+fWmXyE4ht0daiuCz7aUunyUedPTEjBCKHRr eXrn7/YcbhxZgK2Y+57C2/gLoz7UUJLLgj9pgNaWEPFYFtTtwN7dh3j5ViXDsqa/GJSc CXaEElC9vxlh5ggAUgjZMGdIqoy/NMY7iR62RiGKZxxRbR2ULmTmXKBfsEYOZvR4SqfI kiow0x93c/tN0Pfz8JqZdU+rEuhVNRmMdExpcmsMKPKgacr+IkyKtuA++vDBNLce7mv6 fw4fRFyrf7gQRzpmeoGjk68ywnLwUmc0tTg4FAygwS4tze7JQpUeXQjyIPZgtZwM+jXB qYnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783517428; x=1784122228; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:content-type:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=lRSxxUfUOsOthWc/W0/61ndF+KiOfs3wdc2i157SyDY=; b=E7YnlI4H3O2jf3oyhjrKJKlujKAXS9zwO3Faoawx9V+/GpxJWfQs8FnqGqMjAWRVe2 4slWM7IIYgKn2WR78YKweQK7F8gx2SALQi6zRWfaX/O84KauYCJSNpi56fcotfy1ReVO 741JIcLRjetazNpHN5Nl/yHmFi/nif5ZzrJfRcq8/+Anj6bozXmsyfcwJ86HHUvDBG/I AVV7IlVzzfw8o5Q+BOKivSGp+WsDRJ7ivaS7Bm6/2YHrqaBN8A/mBvXxdETg3X5ZPxZC yIU+vkr8wMuGGXGQAY3WJHspvlwmpIU1UiXNyWOBaQ5v081r2TMKV2SCmEAQ+1GhvcIE 1t/Q== X-Forwarded-Encrypted: i=1; AHgh+RpLckael83+udcNXR21wUctnmTtm2lPZLfhBZ8AsODfoOt6DcJJJ1jETQVIsFVvYpPH2pplP43bg+ih0H0=@vger.kernel.org X-Gm-Message-State: AOJu0Yzb21qR+a6cqq0+z4aUBGOcVbyG3QMcAkmZbg0wlocLoD34VbXZ q70L9ev67YidVEAcZu9FK8XUXS/kXQ4pd5GLsBSmtSjgxT8SZjRedReu4zP1z0Vq X-Gm-Gg: AfdE7clBBBhcK3dnJn50q48wsbktvsJuO7oDOBgxmEe0hyrtxHrzIVVQydoUH5FuZyu kHmSTsCdjm0bRVN46DWjauUAP80FBulYfYwKAvccsYgnp0vQeDv56EJngfdmmIh/OSONcBTFa+k R8S+XUA9fABYX3JCzN0PvbkJ4wjgnUXmHClCQb0nwdbmWjgztqquHDDhqoT4vdOfOcGf1n6W5ru oFoasnSO0CC1rpXmlYV6Zvx5cq+sEbvoUN6ubHVV5OIaVPO8jlruyIC7lOl11WDYyXEF7OI5Hbc H1vk3yL2rdx7BAn613WjEYGMVkJHugTqPdtn+59DPXT6NzOuYM62QUBU2vxKSOf4QNlJWeIidUr hi0cO+RggEz9a/DuJjlq9hz4LZFGwRh9Ad4qTepp24MKp+awUCEg2MKsQbhF9GNHfoWxV+2kAA2 7hghveZLKgs7C9t1N5lg== X-Received: by 2002:a05:6402:3788:b0:698:52b4:c2c8 with SMTP id 4fb4d7f45d1cf-69ab44b405cmr1078289a12.34.1783517427392; Wed, 08 Jul 2026 06:30:27 -0700 (PDT) Received: from smtpclient.apple ([62.171.228.246]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69acd3e06d6sm218180a12.26.2026.07.08.06.30.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Jul 2026 06:30:26 -0700 (PDT) From: Alexander Kochetkov Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: [RFC] Input: matrix_keypad: fix interrupt regression introduced by commit 01c84b03d80a Message-Id: <4130C026-2A83-408B-836A-ECA044491C47@gmail.com> Date: Wed, 8 Jul 2026 16:30:14 +0300 Cc: Dmitry Torokhov , linux-kernel@vger.kernel.org, Siarhei Volkau To: linux-input@vger.kernel.org X-Mailer: Apple Mail (2.3864.600.51.1.1) Hi everyone, I found a commit [1] that breaks the matrix_keypad behavior on the = Allwinner A64. I have a PINE A64-LTS board with a connected keypad polled by = matrix_keypad. This commit caused interrupts to stop arriving at the matrix_keypad = driver entirely. An explicit call to gpiod_direction_input() disables interrupt reception = on all chips where the GPIO input mode and GPIO interrupt input mode are configured = via the pinmux register. Interrupt reception is guaranteed to break on = Allwinner (A64, H3, H6, etc.), Broadcom (BCM2835/2711), and some Rockchip SoCs. It does not break on NXP i.MX (i.MX6, i.MX8), STMicroelectronics = (STM32MP1), TI Sitara (AM335x), or Intel/AMD. Furthermore, the assumption that enable_row_irqs() restores the = interrupt mode is also specific to the Ingenic pinctrl. In the vast majority of drivers, = enable_row_irqs() is supposed to simply set the interrupt enable mask without changing the = pinmux. Commit [1] was introduced to work around a hardware limitation in = Ingenic's JZ4755. This specific behavior is unique to Ingenic and a small number of = specialized chips. The majority of SoCs (around 90%) allow reading a GPIO input that is = currently configured as an interrupt source. In my opinion, the correct approach would be to revert this commit and = fix the behavior of ingenic_gpio_get_value() inside pinctrl-ingenic.c instead. However, I do = not own an Ingenic board, so I won't be able to test such a patch. Alternatively, I could introduce a DTS property like read-gpio-quirk in = matrix_keypad to restore the original driver behavior by default, and add this property to = qi_lb60.dts so as not to break the Ingenic platform. What do you think? What is the best way to proceed here? Best regards, Alexander Kochetkov [1] commit 01c84b03d80aab9f04c4e3e1f9085f4202ff7c29 ("Input: = matrix_keypad - force switch rows to input mode")=