From: jordan Date: Tue, 27 Jul 2010 01:21:19 +0000 (+0000) Subject: Add additional Notify handler for dock devices, according to ACPI spec X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e097d8aa9fda3d1935b527cbc6227848660ba0de;p=openbsd Add additional Notify handler for dock devices, according to ACPI spec ok marco --- 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 * Copyright (c) 2005 Thorsten Lockert @@ -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 * @@ -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);