summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-07 15:48:27 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-07 15:48:27 +0000
commit4dd049781070f427fef1df9887b084d593fef229 (patch)
tree65a3d97115fa73b3b825239446e87c296357c78a /sys/dev
parent64010126ad431d559008f6ad4c1a78dab8a0896b (diff)
upon resume, notify all the acpiac and acpibat drivers to update
their status. some laptops do not do this automatically. ok kettenis canacar
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index a90f2f81106..a14c2c0e359 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.205 2010/08/06 21:12:27 marco Exp $ */
+/* $OpenBSD: acpi.c,v 1.206 2010/08/07 15:48:26 deraadt Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -2092,10 +2092,21 @@ acpi_thread(void *arg)
}
if (sc->sc_sleepmode) {
+ struct acpi_ac *ac;
+ struct acpi_bat *bat;
int sleepmode = sc->sc_sleepmode;
sc->sc_sleepmode = 0;
acpi_sleep_state(sc, sleepmode);
+
+ /* AC and battery information needs refreshing */
+ SLIST_FOREACH(ac, &sc->sc_ac, aac_link)
+ aml_notify(ac->aac_softc->sc_devnode,
+ 0x80);
+ SLIST_FOREACH(bat, &sc->sc_bat, aba_link)
+ aml_notify(bat->aba_softc->sc_devnode,
+ 0x80);
+
continue;
}
}