aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/battery.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 17:28:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 17:28:55 -0400
commit476525004ac7e2f990b6956efcd44d0780c2ab4c (patch)
tree158cd2bbfb232b4f4327b6c20a4e14c6b095a438 /drivers/acpi/battery.c
parentbd22dc17e49973d3d4925970260e9e37f7580a9f (diff)
parentec033d0a02901551346b9f43f8ff9bad51378891 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & power management update from Len Brown: "Re-write of the turbostat tool. lower overhead was necessary for measuring very large system when they are very idle. IVB support in intel_idle It's what I run on my IVB, others should be able to also:-) ACPICA core update We have found some bugs due to divergence between Linux and the upstream ACPICA base. Most of these patches are to reduce that divergence to reduce the risk of future bugs. Some cpuidle updates, mostly for non-Intel More will be coming, as they depend on this part. Some thermal management changes needed by non-ACPI systems. Some _OST (OS Status Indication) updates for hot ACPI hot-plug." * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (51 commits) Thermal: Documentation update Thermal: Add Hysteresis attributes Thermal: Make Thermal trip points writeable ACPI/AC: prevent OOPS on some boxes due to missing check power_supply_register() return value check tools/power: turbostat: fix large c1% issue tools/power: turbostat v2 - re-write for efficiency ACPICA: Update to version 20120711 ACPICA: AcpiSrc: Fix some translation issues for Linux conversion ACPICA: Update header files copyrights to 2012 ACPICA: Add new ACPI table load/unload external interfaces ACPICA: Split file: tbxface.c -> tbxfload.c ACPICA: Add PCC address space to space ID decode function ACPICA: Fix some comment fields ACPICA: Table manager: deploy new firmware error/warning interfaces ACPICA: Add new interfaces for BIOS(firmware) errors and warnings ACPICA: Split exception code utilities to a new file, utexcep.c ACPI: acpi_pad: tune round_robin_time ACPICA: Update to version 20120620 ACPICA: Add support for implicit notify on multiple devices ACPICA: Update comments; no functional change ...
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r--drivers/acpi/battery.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 023f9c8534d0..ff2c876ec412 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -250,6 +250,13 @@ static int acpi_battery_get_property(struct power_supply *psy,
250 else 250 else
251 val->intval = battery->capacity_now * 1000; 251 val->intval = battery->capacity_now * 1000;
252 break; 252 break;
253 case POWER_SUPPLY_PROP_CAPACITY:
254 if (battery->capacity_now && battery->full_charge_capacity)
255 val->intval = battery->capacity_now * 100/
256 battery->full_charge_capacity;
257 else
258 val->intval = 0;
259 break;
253 case POWER_SUPPLY_PROP_MODEL_NAME: 260 case POWER_SUPPLY_PROP_MODEL_NAME:
254 val->strval = battery->model_number; 261 val->strval = battery->model_number;
255 break; 262 break;
@@ -276,6 +283,7 @@ static enum power_supply_property charge_battery_props[] = {
276 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, 283 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
277 POWER_SUPPLY_PROP_CHARGE_FULL, 284 POWER_SUPPLY_PROP_CHARGE_FULL,
278 POWER_SUPPLY_PROP_CHARGE_NOW, 285 POWER_SUPPLY_PROP_CHARGE_NOW,
286 POWER_SUPPLY_PROP_CAPACITY,
279 POWER_SUPPLY_PROP_MODEL_NAME, 287 POWER_SUPPLY_PROP_MODEL_NAME,
280 POWER_SUPPLY_PROP_MANUFACTURER, 288 POWER_SUPPLY_PROP_MANUFACTURER,
281 POWER_SUPPLY_PROP_SERIAL_NUMBER, 289 POWER_SUPPLY_PROP_SERIAL_NUMBER,
@@ -292,6 +300,7 @@ static enum power_supply_property energy_battery_props[] = {
292 POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, 300 POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
293 POWER_SUPPLY_PROP_ENERGY_FULL, 301 POWER_SUPPLY_PROP_ENERGY_FULL,
294 POWER_SUPPLY_PROP_ENERGY_NOW, 302 POWER_SUPPLY_PROP_ENERGY_NOW,
303 POWER_SUPPLY_PROP_CAPACITY,
295 POWER_SUPPLY_PROP_MODEL_NAME, 304 POWER_SUPPLY_PROP_MODEL_NAME,
296 POWER_SUPPLY_PROP_MANUFACTURER, 305 POWER_SUPPLY_PROP_MANUFACTURER,
297 POWER_SUPPLY_PROP_SERIAL_NUMBER, 306 POWER_SUPPLY_PROP_SERIAL_NUMBER,