https://bugzilla.novell.com/show_bug.cgi?id=753327
https://bugzilla.novell.com/show_bug.cgi?id=753327#c12
Joey Lee changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
InfoProvider|pghben@yahoo.com |
--- Comment #12 from Joey Lee 2012-04-27 05:00:44 UTC ---
Yes, just discussed with Gary, I check the acpi/battery.c and ACPI spec.
Confirm current power_now/current_now interface's output unit is microwatt
(μW):
In spec:
_BST
Returns the current battery status (in other words, dynamic information about
the battery, such as whether the battery is currently charging or discharging,
an estimate of the remaining battery capacity, and so on).
Package {
Battery State // Integer (DWORD)
Battery Present Rate // Integer (DWORD)
Battery Remaining Capacity // Integer (DWORD)
Battery Present Voltage // Integer (DWORD)
}
Battery Present Rate
DWORD
Returns the power or current being supplied or accepted through the battery’s
terminals (direction depends on the Battery State value). The Battery Present
Rate value is expressed as power [mWh] or current [mAh] depending on the Power
Unit value.
Batteries that are rechargeable and are in the discharging state are required
to return a valid Battery Present Rate value.
0x00000000 – 0x7FFFFFFF in [mW] or [mA] 0xFFFFFFFF – Unknown rate
In acpi driver:
vi drivers/acpi/battery.c
static int acpi_battery_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{
...
case POWER_SUPPLY_PROP_CURRENT_NOW:
case POWER_SUPPLY_PROP_POWER_NOW:
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN)
ret = -ENODEV;
else
val->intval = battery->rate_now * 1000; /* mW / 1000
is μW */
break;
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.