NetBSD/sys/dev/acpi
sommerfeld b8de140e4e Prototype ACPI Control Method Battery driver.
ACPI defines two different battery device interfaces: "Control Method"
batteries, in which AML methods are defined in order to get battery
status and set battery alarm thresholds, and a "Smart Battery" device,
which is an SMbus device accessed through the ACPI Embedded Controller
device; this driver knows how to attach to the former sort of device.

As a total kludge, since we haven't wired things up to sysmon/envsys
yet, we report battery status through a once-per-minute kernel printf,
so don't use this driver yet if you want your disk to spin down.

Motivated by and tested on Sony PCG-R505TL laptop, which has
nonfunctional APM.

configure as:

acpibat* at acpi ?

Sample output:

acpibat0 at acpi0: ACPI Battery
acpibat0: Sony Corp. LION
acpibat0: Design 38480mWh, Predicted 38480mWh Warn 120mWh Low 0mWh
acpibat0: discharging: 15112mV cap 25480mWh (66%) rate 16849mW
...
acpibat0: discharging: 15224mV cap 25070mWh (65%) rate 18405mW
...
acpibat0: discharging: 15200mV cap 24310mWh (63%) rate 13771mW
...
acpibat0: charging: 15768mV cap 23330mWh (60%) rate 20388mW
2002-03-24 03:46:10 +00:00
..
acpica Fix a typo. 2002-03-10 18:46:35 +00:00
acpi.c Add acpi_eval_struct, to evaluate a complex data structure. 2002-03-24 03:32:14 +00:00
acpi_acad.c add RCSID 2001-11-13 13:01:57 +00:00
acpi_bat.c Prototype ACPI Control Method Battery driver. 2002-03-24 03:46:10 +00:00
acpi_button.c Don't define ACPI_BUT_DEBUG here. 2002-03-10 19:55:01 +00:00
acpi_ec.c add RCSID 2001-11-13 13:01:57 +00:00
acpi_ecreg.h ACPI Embedded Controller driver. 2001-09-29 05:34:23 +00:00
acpi_lid.c add RCSID 2001-11-13 13:01:57 +00:00
acpi_osd.h Add some basic ACPI probing framework. This is far from complete, 2001-09-28 02:09:22 +00:00
acpi_resource.c add RCSID 2001-11-13 13:01:57 +00:00
acpica.h Glue header file to pull in the ACPICA headers. 2001-09-28 01:25:55 +00:00
acpireg.h Flesh out w/ some comments from the spec, and add some _ADR decoding 2001-09-29 05:33:00 +00:00
acpivar.h Add acpi_eval_struct, to evaluate a complex data structure. 2002-03-24 03:32:14 +00:00
files.acpi Prototype ACPI Control Method Battery driver. 2002-03-24 03:46:10 +00:00