Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262281
b: refs/heads/master
c: e410829
h: refs/heads/master
i:
  262279: 9be41e6
v: v3
  • Loading branch information
Lan Tianyu authored and Len Brown committed Jul 14, 2011
1 parent 9a00e3c commit f4e7d8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1dd5c715e5b7524da8c1030f5cf1ea903e45c457
refs/heads/master: e4108292cc5b5ca07abc83af31a78338362810ca
6 changes: 6 additions & 0 deletions trunk/drivers/acpi/sbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,17 @@ static int acpi_sbs_battery_get_property(struct power_supply *psy,
case POWER_SUPPLY_PROP_POWER_NOW:
val->intval = abs(battery->rate_now) *
acpi_battery_ipscale(battery) * 1000;
val->intval *= (acpi_battery_mode(battery)) ?
(battery->voltage_now *
acpi_battery_vscale(battery) / 1000) : 1;
break;
case POWER_SUPPLY_PROP_CURRENT_AVG:
case POWER_SUPPLY_PROP_POWER_AVG:
val->intval = abs(battery->rate_avg) *
acpi_battery_ipscale(battery) * 1000;
val->intval *= (acpi_battery_mode(battery)) ?
(battery->voltage_now *
acpi_battery_vscale(battery) / 1000) : 1;
break;
case POWER_SUPPLY_PROP_CAPACITY:
val->intval = battery->state_of_charge;
Expand Down

0 comments on commit f4e7d8c

Please sign in to comment.