summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpi.c
diff options
context:
space:
mode:
authorJordan Hargrave <jordan@cvs.openbsd.org>2006-02-19 21:32:31 +0000
committerJordan Hargrave <jordan@cvs.openbsd.org>2006-02-19 21:32:31 +0000
commitacd11f0a841e26b98d96e0d4bf0c332918a4c61f (patch)
tree0e1f1cc671890acb71f93abb9d73c46a10bb513b /sys/dev/acpi/acpi.c
parent0e97777a0da89008117a500d0aae5580257dbc8a (diff)
Added code for aml_notify GPE notification callback
ok marco@
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-rw-r--r--sys/dev/acpi/acpi.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index b5d102a54ee..06111abcad1 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.35 2006/02/19 19:03:49 grange Exp $ */
+/* $OpenBSD: acpi.c,v 1.36 2006/02/19 21:32:30 jordan Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -527,6 +527,19 @@ acpi_foundhid(struct aml_node *node, void *arg)
aaa.aaa_memt = sc->sc_memt;
aaa.aaa_node = node->parent;
config_found(self, &aaa, acpi_print);
+ } else if (!strcmp(dev, ACPI_DEV_LD) ||
+ !strcmp(dev, ACPI_DEV_PBD) ||
+ !strcmp(dev, ACPI_DEV_SBD)) {
+#if 0
+ struct acpi_attach_args aaa;
+
+ memset(&aaa, 0, sizeof(aaa));
+ aaa.aaa_name = "acpibtn";
+ aaa.aaa_iot = sc->sc_iot;
+ aaa.aaa_memt = sc->sc_memt;
+ aaa.aaa_node = node->parent;
+ config_found(self, &aaa, acpi_print);
+#endif
}
}
@@ -1242,6 +1255,9 @@ acpi_isr_thread(void *arg)
if (sc->sc_powerbtn) {
sc->sc_powerbtn = 0;
+
+ if (sc->sc_pbtndev)
+ aml_notify(sc->sc_pbtndev, 0x80);
acpi_evindex++;
dnprintf(1,"power button pressed\n");
KNOTE(sc->sc_note, ACPI_EVENT_COMPOSE(ACPI_EV_PWRBTN,
@@ -1253,6 +1269,9 @@ acpi_isr_thread(void *arg)
}
if (sc->sc_sleepbtn) {
sc->sc_sleepbtn = 0;
+
+ if (sc->sc_sbtndev)
+ aml_notify(sc->sc_sbtndev, 0x80);
acpi_evindex++;
dnprintf(1,"sleep button pressed\n");
KNOTE(sc->sc_note, ACPI_EVENT_COMPOSE(ACPI_EV_SLPBTN,