Expose bif_capacity as the 'design capacity' through an acpibat sensor,
authorlandry <landry@openbsd.org>
Fri, 23 May 2014 19:17:39 +0000 (19:17 +0000)
committerlandry <landry@openbsd.org>
Fri, 23 May 2014 19:17:39 +0000 (19:17 +0000)
commit50c79b3c2b003139c66343c7b805abfae1d2b424
treec692a47dcc97cf61613898d6477475c7a6d295d4
parent437e256a49f49685e10a6c599eea0ef9638bc1f7
Expose bif_capacity as the 'design capacity' through an acpibat sensor,
giving you the original capacity of the battery:

hw.sensors.acpibat0.watthour0=64.07 Wh (last full capacity)
hw.sensors.acpibat0.watthour4=84.24 Wh (design capacity)

hw.sensors.acpibat0.amphour0=2.03 Ah (last full capacity)
hw.sensors.acpibat0.amphour4=4.40 Ah (design capacity)

Diff from Fabian Raetz on tech@, thanks!

ok mlarkin@ zhuk@ armani@ kettenis@
sys/dev/acpi/acpibat.c
sys/dev/acpi/acpidev.h