Deleted Added
full compact
28c28
< __FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_smbat.c 155869 2006-02-21 03:16:58Z njl $");
---
> __FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_smbat.c 186026 2008-12-13 06:04:34Z silby $");
63a64,80
> SYSCTL_DECL(_debug_acpi);
> SYSCTL_NODE(_debug_acpi, OID_AUTO, batt, CTLFLAG_RD, NULL, "Battery debugging");
>
> /* On some laptops with smart batteries, enabling battery monitoring
> * software causes keystrokes from atkbd to be lost. This has also been
> * reported on Linux, and is apparently due to the keyboard and I2C line
> * for the battery being routed through the same chip. Whether that's
> * accurate or not, adding extra sleeps to the status checking code
> * causes the problem to go away.
> *
> * If you experience that problem, try a value of 10ms and move up
> * from there.
> */
> static int batt_sleep_ms;
> SYSCTL_INT(_debug_acpi_batt, OID_AUTO, batt_sleep_ms, CTLFLAG_RW, &batt_sleep_ms, 0,
> "Sleep during battery status updates to prevent keystroke loss.");
>
178a196,198
> if (batt_sleep_ms)
> AcpiOsSleep(batt_sleep_ms);
>
196a217,219
> if (batt_sleep_ms)
> AcpiOsSleep(batt_sleep_ms);
>
241a265,267
> if (batt_sleep_ms)
> AcpiOsSleep(batt_sleep_ms);
>
259a286,288
> if (batt_sleep_ms)
> AcpiOsSleep(batt_sleep_ms);
>
294a324,326
> if (batt_sleep_ms)
> AcpiOsSleep(batt_sleep_ms);
>
301a334,335
> if (batt_sleep_ms)
> AcpiOsSleep(1);