It's pretty dummy, but useful for batteries for which we can only
get voltages.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Anton Vorontsov <cbou@mail.ru>
Dmitry Baryshkovauthored and Anton Vorontsovcommited 2008-02-02 02:44:34 +03:00
Convert to use the class iteration api.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dave Youngauthored and Greg Kroah-Hartmancommited 2008-01-24 20:40:44 -08:00
This patch adds ability to calculate time using energy.
Needed to calculate time_to_full for PMU batteries.
Signed-off-by: Anton Vorontsov <cbou@mail.ru>
Anton Vorontsovcommited 2007-10-05 01:05:00 +04:00
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>
Anton Vorontsovcommited 2007-10-05 01:05:00 +04:00
Prior to this patch, apm_power was unable to report "to empty"/"to full"
time for batteries that hardware-report these values, such as
Apple PMU batteries.
Signed-off-by: Anton Vorontsov <cbou@mail.ru>
Anton Vorontsovcommited 2007-10-05 01:04:59 +04:00