From: Rich T. <rh...@ba...> - 2005-01-14 19:24:20
|
Hi all -- Recently, Bruno Ducrot posted a driver that allows access to smart batteries, through the /dev/i2c interface. This came at just the right time for me, since I'd recently purchased an Acer TravelMate 4502, and had no way to monitor the status of the smart battery. However, this driver is primarily to allow access to the SMBus inside the embedded controller that communicates with the Smart Battery System (SBS); other tools are required to read the battery status. Bruno provided a userspace tool, but there is still a requirement for some form of /proc/acpi interface that current battery-monitoring tools can read. Accordingly, I've written a first shot at an SBS ACPI driver. This driver, which can be downloaded from http://shayol.bartol.udel.edu/~rhdt/download/acpi_sbs-20040114.tar.gz ...provides access to the SBS via a new /proc/acpi/sbs interface, and also provides a "legacy" /proc/acpi/battery interface that current battery-monitoring tools can access. This driver depends on Bruno's i2c-acpi-ec driver, which I have included with my source code since a couple of bug fixes were necessary. Instructions for compilation and installation, plus some anticipated FAQs, can all be found in the accompanying README file. This is my first ever shot at kernel programming (and in fact my first real program in C!), so please expect there to be a number of goofs; but it seems to work OK on my system (2.6.10-gentoo-r4, with battery monitoring using wmacpi-1.99). Let me know what you find! On a final note, DON'T use the SBS driver if you have the ACPI battery driver enabled in the kernel (either built-in, or as a module) -- the two will clash over their use of /proc/acpi/battery, and things will get Ugly(tm). cheers, Rich Townsend |