diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2002-10-24 10:56:33 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2002-10-24 10:56:33 +0000 |
commit | 4e82bade9fae829dcf0202c4c000c6032c5254e6 (patch) | |
tree | cafc66d7186172650553777a363d39e3904da32a /sys/dev/acpica/acpi_ec.c | |
parent | 4fca76caa2b2561b57f6ae49986517894450fd8a (diff) | |
download | FreeBSD-src-4e82bade9fae829dcf0202c4c000c6032c5254e6.zip FreeBSD-src-4e82bade9fae829dcf0202c4c000c6032c5254e6.tar.gz |
Add new loader tunable hw.acpi.ec.event_driven so that we control
EcWaitEventIntr()'s behavior.
Some EC controllers require this for working properly (including
sleep/wakeup).
Diffstat (limited to 'sys/dev/acpica/acpi_ec.c')
-rw-r--r-- | sys/dev/acpica/acpi_ec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 96da6d3..f41cebf 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -244,6 +244,9 @@ struct acpi_ec_softc { int ec_csrvalue; }; +static int acpi_ec_event_driven = 0; +TUNABLE_INT("hw.acpi.ec.event_driven", &acpi_ec_event_driven); + #define EC_LOCK_TIMEOUT 1000 /* 1ms */ static __inline ACPI_STATUS @@ -618,7 +621,7 @@ EcWaitEventIntr(struct acpi_ec_softc *sc, EC_EVENT Event) ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Event); /* XXX this should test whether interrupts are available some other way */ - if(cold) + if (cold || acpi_ec_event_driven) return_ACPI_STATUS(EcWaitEvent(sc, Event)); if (!EcIsLocked(sc)) |