diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-03-21 17:06:57 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-03-24 20:47:35 -0400 |
commit | e6e82a3087e6dad619149246082c910623ea9c36 (patch) | |
tree | 59a99eb1206c5b478a8154fc0d6712797a797901 /drivers/acpi | |
parent | cc7feea39bed2951cc29af3ad642f39a99dfe8d3 (diff) | |
download | op-kernel-dev-e6e82a3087e6dad619149246082c910623ea9c36.zip op-kernel-dev-e6e82a3087e6dad619149246082c910623ea9c36.tar.gz |
ACPI: EC: Restore udelay in poll mode
This fixes keyboard event handling on some systems.
Note that this delay was thought unnecessary, and removed
from linux-2.6.20 with 50c1e1138cb94f6aca0f8555777edbcefe0324e2
'ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.'
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 7222a18..828c752 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -73,6 +73,7 @@ enum ec_event { #define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */ #define ACPI_EC_UDELAY_GLK 1000 /* Wait 1ms max. to get global lock */ +#define ACPI_EC_UDELAY 100 /* Wait 100us before polling EC again */ enum { EC_FLAGS_WAIT_GPE = 0, /* Don't check status until GPE arrives */ @@ -227,6 +228,7 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) while (time_before(jiffies, delay)) { if (acpi_ec_check_status(ec, event)) goto end; + udelay(ACPI_EC_UDELAY); } } pr_err(PREFIX "acpi_ec_wait timeout," |