Skip to content

Commit e02ea3a

Browse files
corngoodij-intel
authored andcommitted
platform/x86: intel-hid: disable wakeup_mode during hibernation
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: 0c4cae1 ("PM: hibernate: Avoid missing wakeup events during hibernation") Signed-off-by: David McFarland <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 8a243d9 commit e02ea3a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • drivers/platform/x86/intel

drivers/platform/x86/intel/hid.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,14 @@ static int intel_hid_pl_suspend_handler(struct device *device)
438438
return 0;
439439
}
440440

441+
static int intel_hid_pl_freeze_handler(struct device *device)
442+
{
443+
struct intel_hid_priv *priv = dev_get_drvdata(device);
444+
445+
priv->wakeup_mode = false;
446+
return intel_hid_pl_suspend_handler(device);
447+
}
448+
441449
static int intel_hid_pl_resume_handler(struct device *device)
442450
{
443451
intel_hid_pm_complete(device);
@@ -452,7 +460,7 @@ static int intel_hid_pl_resume_handler(struct device *device)
452460
static const struct dev_pm_ops intel_hid_pl_pm_ops = {
453461
.prepare = intel_hid_pm_prepare,
454462
.complete = intel_hid_pm_complete,
455-
.freeze = intel_hid_pl_suspend_handler,
463+
.freeze = intel_hid_pl_freeze_handler,
456464
.thaw = intel_hid_pl_resume_handler,
457465
.restore = intel_hid_pl_resume_handler,
458466
.suspend = intel_hid_pl_suspend_handler,

0 commit comments

Comments
 (0)