Skip to content

Commit

Permalink
surface_acpi: Default-disable wakeup on SSH
Browse files Browse the repository at this point in the history
The SSH device causes some unwanted wakeups. It seems that Windows has
additional checks that determine if the system should be resumed or not.
Thus set power/wakeup to false until we've figured that out.
  • Loading branch information
qzed committed Dec 5, 2019
1 parent 160e224 commit 5717e13
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/platform/x86/surface_sam/surface_sam_ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,15 @@ static int surface_sam_ssh_probe(struct serdev_device *serdev)

surface_sam_ssh_release(ec);

device_init_wakeup(&serdev->dev, true);
// TODO: The EC can wake up the system via the associated GPIO interrupt in
// multiple situations. One of which is the remaining battery capacity
// falling below a certain threshold. Normally, we should use the
// device_init_wakeup function, however, the EC also seems to have other
// reasons for waking up the system and it seems that Windows has
// additional checks whether the system should be resumed. In short, this
// causes some spourious unwanted wake-ups. For now let's thus default
// power/wakeup to false.
device_set_wakeup_capable(&serdev->dev, true);
acpi_walk_dep_device_list(ssh);

return 0;
Expand Down

0 comments on commit 5717e13

Please sign in to comment.