aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/apm_power.c
Commit message (Collapse)AuthorAge
* apm_power: Fix style error in macrosKen O'Brien2011-07-08
| | | | | | | | Two macros in the changed file contained complex expressions which were not enclosed by parentheses. Signed-off-by: Ken O'Brien <kernel@kenobrien.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* apm_power: Add missing break statementAnton Vorontsov2010-09-08
| | | | | | | | | The missing break statement causes wrong capacity calculation for batteries that report energy. Reported-by: d binderman <dcb314@hotmail.com> Cc: <stable@kernel.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* Driver Core: add ability for class_for_each_device to start in middle of listGreg Kroah-Hartman2008-07-22
| | | | | | | | | | | | | | | This mirrors the functionality that driver_for_each_device has as well. We add a start variable, and all callers of the function are fixed up at the same time. The block layer will be using this new functionality in a follow-on patch. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* apm_power: check I.intval for zero value, we use it as the divisorAnton Vorontsov2008-02-01
| | | | Signed-off-by: Anton Vorontsov <cbou@mail.ru>
* apm_power: support using VOLTAGE_* properties for apm calculationsDmitry Baryshkov2008-02-01
| | | | | | | | 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>
* power supply : use class iteration apiDave Young2008-01-24
| | | | | | | | | | 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>
* apm_power: calculate to_full/to_empty time using energyAnton Vorontsov2007-10-04
| | | | | | | 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>
* apm_power: improve battery finding algorithmAnton Vorontsov2007-10-04
| | | | | | | | | | | | | | 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>
* apm_power: fix obviously wrong logic for time reportingAnton Vorontsov2007-10-04
| | | | | | | | 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>
* Power supply class and drivers: remove non obligatory return statementsAnton Vorontsov2007-07-15
| | | | | | | Per Jeff Garzik request. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
* [BATTERY] APM emulation driver for class batteriesAnton Vorontsov2007-07-10
Signed-off-by: Eugeny Boger <eugenyboger@dgap.mipt.ru> Signed-off-by: Anton Vorontsov <cbou@mail.ru> Signed-off-by: David Woodhouse <dwmw2@infradead.org>