]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
platform/x86: intel-hid: disable wakeup_mode during hibernation
authorDavid McFarland <corngood@gmail.com>
Thu, 5 Feb 2026 23:16:24 +0000 (19:16 -0400)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 23 Mar 2026 12:49:06 +0000 (14:49 +0200)
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>
Link: https://patch.msgid.link/20260205231629.1336348-1-corngood@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/hid.c

index 95c405c8bac02aaa6b24945e666316f8d6b5485f..2ddd8af8c1ce9e72a4684edb02e37ad0ec1e907c 100644 (file)
@@ -438,6 +438,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);
@@ -452,7 +460,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,