public inbox for platform-driver-x86@vger.kernel.org
 help / color / mirror / Atom feed
From: David McFarland <corngood@gmail.com>
To: David McFarland <corngood@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Hans de Goede <hansg@kernel.org>, Alex Hung <alexhung@gmail.com>
Cc: platform-driver-x86@vger.kernel.org
Subject: [PATCH v3] platform/x86/intel: disable wakeup_mode during hibernation
Date: Thu,  5 Feb 2026 19:16:24 -0400	[thread overview]
Message-ID: <20260205231629.1336348-1-corngood@gmail.com> (raw)
In-Reply-To: <93b91d70-061b-4db0-a82b-2da5cab67fbd@linux.intel.com>

Add a freeze handler which clears wakeup_mode. This fixes aborted hibernation on
Dell Precision 3880.

  Wakeup event detected during hibernation, rolling back

This system sends power button events during hibernation, even when triggered by
software.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218634
Fixes: 0c4cae1bc00d ("PM: hibernate: Avoid missing wakeup events during hibernation")
Signed-off-by: David McFarland <corngood@gmail.com>
---
 drivers/platform/x86/intel/hid.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

v1 -> v2: fixed bugzilla link
v2 -> v3: changes suggested by Ilpo

Thanks Ilpo for the suggestions.

diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
index f25a427cccda..6ed85d48ee93 100644
--- a/drivers/platform/x86/intel/hid.c
+++ b/drivers/platform/x86/intel/hid.c
@@ -406,6 +406,14 @@ static int intel_hid_pl_suspend_handler(struct device *device)
 	return 0;
 }
 
+static int intel_hid_pl_freeze_handler(struct device *device)
+{
+	struct intel_hid_priv *priv = dev_get_drvdata(device);
+
+	priv->wakeup_mode = false;
+	return intel_hid_pl_suspend_handler(device);
+}
+
 static int intel_hid_pl_resume_handler(struct device *device)
 {
 	intel_hid_pm_complete(device);
@@ -420,7 +428,7 @@ static int intel_hid_pl_resume_handler(struct device *device)
 static const struct dev_pm_ops intel_hid_pl_pm_ops = {
 	.prepare = intel_hid_pm_prepare,
 	.complete = intel_hid_pm_complete,
-	.freeze  = intel_hid_pl_suspend_handler,
+	.freeze  = intel_hid_pl_freeze_handler,
 	.thaw  = intel_hid_pl_resume_handler,
 	.restore  = intel_hid_pl_resume_handler,
 	.suspend  = intel_hid_pl_suspend_handler,
-- 
2.52.0


  reply	other threads:[~2026-02-05 23:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 14:17 [PATCH] platform/x86/intel: disable wakeup_mode during hibernation David McFarland
2026-01-20 16:10 ` [PATCH v2] " David McFarland
2026-01-22 15:46   ` David McFarland
2026-01-29 12:25   ` Ilpo Järvinen
2026-02-05 23:16     ` David McFarland [this message]
2026-03-17 13:01       ` [PATCH v3] " Ilpo Järvinen

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=20260205231629.1336348-1-corngood@gmail.com \
    --to=corngood@gmail.com \
    --cc=alexhung@gmail.com \
    --cc=hansg@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@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