apm_power: improve battery finding algorithm
authorAnton Vorontsov <cbou@mail.ru>
Thu, 4 Oct 2007 21:05:00 +0000 (01:05 +0400)
committerAnton Vorontsov <cbou@mail.ru>
Thu, 4 Oct 2007 21:05:00 +0000 (01:05 +0400)
Prior to this patch, if use_for_apm unspecified, apm_power able
to choice batteries according to their charge only.

This patch adds ability to choice batteries according to their charge,
energy, use_for_apm flag, and fallback to any battery if it failed to
decide.

Patch is mandatory to report Apple PMU batteries through legacy
/proc/apm interface using power supply class.

Signed-off-by: Anton Vorontsov <cbou@mail.ru>

No differences found