summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Hargrave <jordan@cvs.openbsd.org>2010-07-27 01:21:20 +0000
committerJordan Hargrave <jordan@cvs.openbsd.org>2010-07-27 01:21:20 +0000
commit60c0a06ab5d60835b1ef6c8e4cdf7abcc46571c9 (patch)
tree17f07ef202f0eb110b3781213ea374b7bf504100
parent7d93d7d66274949018924eeb6a5fe26ef4d71bbb (diff)
Add additional Notify handler for dock devices, according to ACPI spec
ok marco
-rw-r--r--sys/dev/acpi/acpidev.h3
-rw-r--r--sys/dev/acpi/acpidock.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpidev.h b/sys/dev/acpi/acpidev.h
index 8187f27976d..a3b2166917f 100644
--- a/sys/dev/acpi/acpidev.h
+++ b/sys/dev/acpi/acpidev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpidev.h,v 1.29 2010/07/26 19:54:06 jordan Exp $ */
+/* $OpenBSD: acpidev.h,v 1.30 2010/07/27 01:21:19 jordan Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
@@ -305,6 +305,7 @@ struct acpidock_softc {
};
#define ACPIDOCK_EVENT_INSERT 0
+#define ACPIDOCK_EVENT_DEVCHECK 1
#define ACPIDOCK_EVENT_EJECT 3
#define ACPIEC_MAX_EVENTS 256
diff --git a/sys/dev/acpi/acpidock.c b/sys/dev/acpi/acpidock.c
index 2d213803e23..d4dc09cdfaa 100644
--- a/sys/dev/acpi/acpidock.c
+++ b/sys/dev/acpi/acpidock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpidock.c,v 1.41 2010/07/23 18:38:46 jordan Exp $ */
+/* $OpenBSD: acpidock.c,v 1.42 2010/07/27 01:21:19 jordan Exp $ */
/*
* Copyright (c) 2006,2007 Michael Knudsen <mk@openbsd.org>
*
@@ -226,6 +226,9 @@ acpidock_notify(struct aml_node *node, int notify_type, void *arg)
break;
case ACPIDOCK_EVENT_EJECT:
+ case ACPIDOCK_EVENT_DEVCHECK:
+ /* ACPI Spec says eject button press generates
+ * a Notify(Device, 1); */
TAILQ_FOREACH(n, &sc->sc_deps_h, entries)
acpidock_eject(sc, n->node);
acpidock_dockctl(sc, 0);