From 8a68ca413b39f6ea18c3edf66166d9a31999c165 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Mon, 22 Sep 2008 21:35:49 +0000 Subject: ignore a type 6 event seen on my x200 when the ac adapter is plugged in and removed --- sys/dev/acpi/acpithinkpad.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpi/acpithinkpad.c b/sys/dev/acpi/acpithinkpad.c index 26801a65c2e..bc2500bed14 100644 --- a/sys/dev/acpi/acpithinkpad.c +++ b/sys/dev/acpi/acpithinkpad.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpithinkpad.c,v 1.11 2008/06/11 04:42:09 marco Exp $ */ +/* $OpenBSD: acpithinkpad.c,v 1.12 2008/09/22 21:35:48 jcs Exp $ */ /* * Copyright (c) 2008 joshua stein * @@ -69,6 +69,9 @@ #define THINKPAD_TABLET_PEN_INSERTED 0x00b #define THINKPAD_TABLET_PEN_REMOVED 0x00c +/* type 6 events */ +#define THINKPAD_POWER_CHANGED 0x030 + /* type 7 events */ #define THINKPAD_SWITCH_WIRELESS 0x000 @@ -274,6 +277,13 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg) break; } break; + case 6: + switch (event) { + case THINKPAD_POWER_CHANGED: + handled = 1; + break; + } + break; case 7: switch (event) { case THINKPAD_SWITCH_WIRELESS: -- cgit v1.2.3