from the ACPI-starts-spilling-beans dept.
More ACPI news. Jordan did a bunch of work and now we can actually read values out of batteries and stuff with AML. This makes the code almost useful! So for debugging purposes I rigged the acpibat and acpiac devices to export some useful data through the sensors framework. Word of warning here, this is for debug only! Pretty cool to see the battery charge/discharge and other status percolate to userspace. And in good debug fashion I found out that we are leaking some memory somewhere which causes the updates to seize after a while. Jordan is plugging memory leaks as we speak. Anyway Jordan is making solid progress and I am just simply using it in the little device drivers. What is important here is that we already have received some reports from the field that it works. We have also received some pretty useful bug reports which are being fixed as soon as we get to it. More later.
Here is some output:
hw.sensors.0=acpiac0, power supply, indicator, On
hw.sensors.1=acpibat0, last full capacity, percent, 76.00%
hw.sensors.2=acpibat0, warning capacity, percent, 10.00%
hw.sensors.3=acpibat0, low capacity, percent, 10.00%
hw.sensors.4=acpibat0, voltage, OK, volts_dc, 11.10 V
hw.sensors.5=acpibat0, battery charging, OK, raw, 0
hw.sensors.6=acpibat0, rate, raw, 1
hw.sensors.7=acpibat0, remaining capacity, percent, 100.00%
hw.sensors.8=acpibat0, current voltage, OK, volts_dc, 12.54 V
Fun statistic is the "last full capacity". In my case you can see that my battery has lost 24% of capacity since I got it. I guess this is the statistic no one wants to advertise :-)