diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-10-19 15:49:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-10-19 15:49:36 +0000 |
commit | 25e97784c24a8da6929144b7db181e915b62fe8d (patch) | |
tree | 05224ca38588ac3f4b89a4006621def5ebf0edff /sys | |
parent | faf9378f51111a10007eb366a73cca35ab0b16e9 (diff) |
Support the hibernate key (Fn-F12)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpi/acpithinkpad.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpithinkpad.c b/sys/dev/acpi/acpithinkpad.c index 1499e552502..7ee784f5b42 100644 --- a/sys/dev/acpi/acpithinkpad.c +++ b/sys/dev/acpi/acpithinkpad.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpithinkpad.c,v 1.31 2013/07/03 15:34:48 sf Exp $ */ +/* $OpenBSD: acpithinkpad.c,v 1.32 2013/10/19 15:49:35 deraadt Exp $ */ /* * Copyright (c) 2008 joshua stein <jcs@openbsd.org> * @@ -321,6 +321,13 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg) #endif handled = 1; break; + case THINKPAD_BUTTON_HIBERNATE: +#ifndef SMALL_KERNEL + acpi_addtask(sc->sc_acpi, acpi_sleep_task, + sc->sc_acpi, ACPI_STATE_S4); +#endif + handled = 1; + break; case THINKPAD_BACKLIGHT_CHANGED: case THINKPAD_BRIGHTNESS_CHANGED: case THINKPAD_BUTTON_BATTERY_INFO: @@ -330,7 +337,6 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg) case THINKPAD_BUTTON_FN_F1: case THINKPAD_BUTTON_FN_F6: case THINKPAD_BUTTON_FN_SPACE: - case THINKPAD_BUTTON_HIBERNATE: case THINKPAD_BUTTON_LOCK_SCREEN: case THINKPAD_BUTTON_POINTER_SWITCH: case THINKPAD_BUTTON_THINKLIGHT: |