From: Lee Jones <lee@kernel.org>
To: lee@kernel.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Chen-Yu Tsai <wens@kernel.org>, Carlo Caione <carlo@caione.org>,
Hans de Goede <hansg@kernel.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH 07/10] Input: axp20x-pek - skip IRQ handling during sleep without input device
Date: Mon, 23 Nov 2026 18:31:13 +0000 [thread overview]
Message-ID: <20261123183200.3900004-8-lee@kernel.org> (raw)
In-Reply-To: <20261123183200.3900004-1-lee@kernel.org>
On Cherry Trail systems where an ACPI GPIO button device already handles
the power button, axp20x_pek_should_register_input() returns false and
axp20x_pek_probe() skips axp20x_pek_probe_input_device(). This leaves
axp20x_pek->input NULL and both irq_dbr and irq_dbf zero-initialised.
axp20x_pek_suspend() and axp20x_pek_resume() nevertheless pass irq_dbf
and irq_dbr unconditionally to disable_irq(), enable_irq(), and their
wakeup counterparts, manipulating IRQ 0 (the legacy x86 system timer)
across suspend and resume.
Skip interrupt management in axp20x_pek_suspend() and
axp20x_pek_resume() when no input device was registered.
Fixes: 8a78050ee257 ("Input: axp20x-pek - revert "always register interrupt handlers" change")
Closes: https://sashiko.dev/#/bug/linux-5ae6851f-784e-481c-900b-2e1686578c89
Cc: stable@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
drivers/input/misc/axp20x-pek.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c
index cbbc9db33ad2..a02cdabcf22b 100644
--- a/drivers/input/misc/axp20x-pek.c
+++ b/drivers/input/misc/axp20x-pek.c
@@ -329,6 +329,9 @@ static int axp20x_pek_suspend(struct device *dev)
{
struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev);
+ if (!axp20x_pek->input)
+ return 0;
+
/*
* As nested threaded IRQs are not automatically disabled during
* suspend, we must explicitly disable non-wakeup IRQs.
@@ -348,6 +351,9 @@ static int axp20x_pek_resume(struct device *dev)
{
struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev);
+ if (!axp20x_pek->input)
+ return 0;
+
if (device_may_wakeup(dev)) {
disable_irq_wake(axp20x_pek->irq_dbf);
disable_irq_wake(axp20x_pek->irq_dbr);
--
2.56.1.750.gf70dc682cf-goog
next prev parent reply other threads:[~2026-11-23 18:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 18:31 [PATCH 00/10] Input: assorted bug fixes across input drivers Lee Jones
2026-11-23 18:31 ` [PATCH 01/10] Input: matrix_keypad - validate GPIO counts against matrix limits Lee Jones
2026-11-23 18:31 ` [PATCH 02/10] Input: cyapa - validate firmware image size in cyapa_pip_check_fw() Lee Jones
2026-11-23 18:31 ` [PATCH 03/10] Input: applespi - cancel touchpad registration work on removal Lee Jones
2026-11-23 18:31 ` [PATCH 04/10] Input: matrix_keypad - only stop and start active device across sleep Lee Jones
2026-11-23 18:42 ` sashiko-bot
2026-11-23 18:31 ` [PATCH 05/10] Input: stinger - zero-initialise driver state in stinger_connect() Lee Jones
2026-11-23 18:31 ` [PATCH 06/10] Input: synaptics-rmi4 - check for NULL drvdata in rmi_set_attn_data() Lee Jones
2026-11-23 18:31 ` Lee Jones [this message]
2026-11-23 18:31 ` [PATCH 08/10] Input: mt6779-keypad - enable keypad clock before programming registers Lee Jones
2026-11-23 18:31 ` [PATCH 09/10] Input: pinephone-keyboard - request IRQ before registering input device Lee Jones
2026-11-23 18:31 ` [PATCH 10/10] Input: wacom_w8001 - use reinit_completion() in w8001_command() Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261123183200.3900004-8-lee@kernel.org \
--to=lee@kernel.org \
--cc=carlo@caione.org \
--cc=dmitry.torokhov@gmail.com \
--cc=hansg@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox