Toshiba Satellite P10 + wrong battery state reported by
ACPIIO_BATT_GET_BATTINFO.
Yuri Skripachov
skripachov at mail.ru
Thu Dec 8 03:37:41 PST 2005
> Which way is right?
It seems to me that right way is to define ACPI_BATT_STAT_NOT_PRESENT
as (ACPI_BATT_STAT_CHARGING | ACPI_BATT_STAT_DISCHARG) because these
bits are mutually exclusive and must not both be set at the same
time. Even in critical state. And then change the
acpi_battery_bst_valid() in dev/acpica/acpi_battery.c.
-- cut
/* Check _BST results for validity. */
int
acpi_battery_bst_valid(struct acpi_bst *bst)
{
if ((bst->state & ACPI_BATT_STAT_NOT_PRESENT) ==
ACPI_BATT_STAT_NOT_PRESENT
|| bst->cap == 0xffffffff || bst->volt == 0xffffffff)
return (FALSE);
else
return (TRUE);
}
-- cut
--
Best regards,
Yuri Skripachov
mailto:skripachov at mail.ru
"The faster I go, the behinder I get."
-- Lewis Carroll --
More information about the freebsd-acpi
mailing list