diff options
author | joshua stein <jcs@cvs.openbsd.org> | 2013-04-02 00:46:48 +0000 |
---|---|---|
committer | joshua stein <jcs@cvs.openbsd.org> | 2013-04-02 00:46:48 +0000 |
commit | 42d85e71975adc3001b0847c6898314597b54bef (patch) | |
tree | c403cd2d0bf391712d75ac58d91091660537f217 /sys/dev/acpi/acpithinkpad.c | |
parent | 631b8ed5421652a7626c49118a16807049555fe5 (diff) |
recognize and ignore power change event from newer thinkpads
group and sort ignored events
ok deraadt
Diffstat (limited to 'sys/dev/acpi/acpithinkpad.c')
-rw-r--r-- | sys/dev/acpi/acpithinkpad.c | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/sys/dev/acpi/acpithinkpad.c b/sys/dev/acpi/acpithinkpad.c index 08a4e241645..511fc1584da 100644 --- a/sys/dev/acpi/acpithinkpad.c +++ b/sys/dev/acpi/acpithinkpad.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpithinkpad.c,v 1.29 2013/03/22 22:15:01 kettenis Exp $ */ +/* $OpenBSD: acpithinkpad.c,v 1.30 2013/04/02 00:46:47 jcs Exp $ */ /* * Copyright (c) 2008 joshua stein <jcs@openbsd.org> * @@ -73,7 +73,8 @@ #define THINKPAD_BRIGHTNESS_CHANGED 0x5010 #define THINKPAD_TABLET_PEN_INSERTED 0x500b #define THINKPAD_TABLET_PEN_REMOVED 0x500c -#define THINKPAD_POWER_CHANGED 0x6030 +#define THINKPAD_THERMAL_TABLE_CHANGED 0x6030 +#define THINKPAD_POWER_CHANGED 0x6040 #define THINKPAD_BACKLIGHT_CHANGED 0x6050 #define THINKPAD_SWITCH_WIRELESS 0x7000 @@ -301,18 +302,6 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg) #endif handled = 1; break; - case THINKPAD_BUTTON_HIBERNATE: - case THINKPAD_BUTTON_FN_F1: - case THINKPAD_BUTTON_LOCK_SCREEN: - case THINKPAD_BUTTON_BATTERY_INFO: - case THINKPAD_BUTTON_FN_F6: - case THINKPAD_BUTTON_EXTERNAL_SCREEN: - case THINKPAD_BUTTON_POINTER_SWITCH: - case THINKPAD_BUTTON_EJECT: - case THINKPAD_BUTTON_THINKLIGHT: - case THINKPAD_BUTTON_FN_SPACE: - handled = 1; - break; case THINKPAD_BUTTON_VOLUME_MUTE: thinkpad_volume_mute(sc); handled = 1; @@ -332,24 +321,29 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg) #endif handled = 1; break; - case THINKPAD_BUTTON_THINKVANTAGE: + case THINKPAD_BACKLIGHT_CHANGED: + case THINKPAD_BRIGHTNESS_CHANGED: + case THINKPAD_BUTTON_BATTERY_INFO: + case THINKPAD_BUTTON_EJECT: + case THINKPAD_BUTTON_EXTERNAL_SCREEN: case THINKPAD_BUTTON_FN_F11: - handled = 1; - break; - case THINKPAD_LID_OPEN: + 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: + case THINKPAD_BUTTON_THINKVANTAGE: case THINKPAD_LID_CLOSED: - case THINKPAD_TABLET_SCREEN_NORMAL: - case THINKPAD_TABLET_SCREEN_ROTATED: - case THINKPAD_BRIGHTNESS_CHANGED: - case THINKPAD_TABLET_PEN_INSERTED: - case THINKPAD_TABLET_PEN_REMOVED: - handled = 1; - break; + case THINKPAD_LID_OPEN: case THINKPAD_POWER_CHANGED: - case THINKPAD_BACKLIGHT_CHANGED: - handled = 1; - break; case THINKPAD_SWITCH_WIRELESS: + case THINKPAD_TABLET_PEN_INSERTED: + case THINKPAD_TABLET_PEN_REMOVED: + case THINKPAD_TABLET_SCREEN_NORMAL: + case THINKPAD_TABLET_SCREEN_ROTATED: + case THINKPAD_THERMAL_TABLE_CHANGED: handled = 1; break; default: |