[ltp] tp_smapi 0.09 (dual battery, extended status support)

Shem Multinymous linux-thinkpad@linux-thinkpad.org
Tue, 13 Dec 2005 01:33:47 +0200


Hi,

A new version of ThinkPad SMAPI support for Linux:

https://sourceforge.net/project/showfiles.php?group_id=3D1212&package_id=3D=
171579

0.09  2005-12-12
----------------
- Dual-battery support: moved all battery-related sysfs files to
  /sys/devices/platform/smapi/BAT0/*
  and made the 2nd battery accessible via
  /sys/devices/platform/smapi/BAT1/*
- Added numerous read-only battery status files:
  /sys/devices/platform/smapi/BAT?/{installed,cycle_count,current1,current2=
,
  last_full_capacity,remaining_capacity,design_capacity,voltage,
  design_voltage,manufacturer,model,serial,barcoding ,chemistry}
  These are incompatible with HDAPS - see below.
- Added "debug" module parameter, default (debug=3D0) reduces printk verbos=
ity.
  For bug reports, please use "modprobe debug=3D1" (or just use "make load"=
).
- Now requires kernel >=3D 2.6.13 (stick with v0.08 for earlier kernels).
- Suspend+resume now correctly handles default thresholds (start=3D=3Dstop=
=3D=3D0).
- Extended whitelist to cover all ThinkPads.
- Cleanup of init/probing code.
- Reduced kernel logging level
- Fix in set_inhibit_charge


Conflict with HDAPS
-------------------

The extended battery status function conflicts with the "hdaps" kernel
module (they use the same IO ports). If you load "hdaps" first,
tp_smapi will disable these functions (and log a message in the kernel
log). If you load "tp_smapi" first, "hdaps" will refuse to load. Use
"rmmod" to switch between the two.

Some of the battery status is also visible through ACPI (/proc/acpi/battery=
/).

The charging control files (*_charge_thresh and inhibit_charge_minutes) don=
't
have this problem.


Questions
---------
Who is this strange component at ports 0x1600-0x161f, which serves
both the HDAPS and the battery information? Is it (yet another)
interface to the embedded controller?

I'm not sure about all of the extended status files. In particular:
* Is cycle_count correct?
* What's the difference between current1 and current1?
* Are design_capacity and last_full_capacity reversed?
* Where are the activity (charging etc.) bits?
* What other information is available?
The raw status information is in the 128 bytes provided by
/sys/devices/platform/smapi/BAT0/dump, so if you can figure out
additional fields from that, please do tell.

  Shem