summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-09-11 03:17:33 +0000
committernjl <njl@FreeBSD.org>2003-09-11 03:17:33 +0000
commitc689dd854794993e407f61317855aef062ed43e6 (patch)
treeea91d1da411af0c4f327e2f308c5c5e75a0cecc6 /sys/dev/acpica
parent99d28702f54161da2e19f22b24e2ea083a4b12b0 (diff)
downloadFreeBSD-src-c689dd854794993e407f61317855aef062ed43e6.zip
FreeBSD-src-c689dd854794993e407f61317855aef062ed43e6.tar.gz
Add a system notify handler in addition to the device notify handler.
At least some Toshiba notebooks use a Notify of 0 or 1 for this. PR: Submitted by: Hiroyuki Aizu <aizu@navi.org>
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_cmbat.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_cmbat.c b/sys/dev/acpica/acpi_cmbat.c
index 1b4f85b..9ca5989 100644
--- a/sys/dev/acpica/acpi_cmbat.c
+++ b/sys/dev/acpica/acpi_cmbat.c
@@ -296,9 +296,11 @@ acpi_cmbat_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
return;
switch (notify) {
+ case ACPI_NOTIFY_DEVICE_CHECK:
case ACPI_BATTERY_BST_CHANGE:
timespecclear(&sc->bst_lastupdated);
break;
+ case ACPI_NOTIFY_BUS_CHECK:
case ACPI_BATTERY_BIF_CHANGE:
timespecclear(&sc->bif_lastupdated);
AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_cmbat_get_bif, dev);
@@ -331,6 +333,13 @@ acpi_cmbat_attach(device_t dev)
return (ENXIO);
handle = acpi_get_handle(dev);
+
+ /*
+ * Install a system notify handler in addition to the device notify.
+ * Toshiba notebook uses this alternate notify for its battery.
+ */
+ AcpiInstallNotifyHandler(handle, ACPI_SYSTEM_NOTIFY,
+ acpi_cmbat_notify_handler, dev);
AcpiInstallNotifyHandler(handle, ACPI_DEVICE_NOTIFY,
acpi_cmbat_notify_handler, dev);
OpenPOWER on IntegriCloud