aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
authorLennart Poettering <mzxreary@0pointer.de>2007-05-04 08:16:19 -0400
committerLen Brown <len.brown@intel.com>2007-05-10 03:52:22 -0400
commit00eb43a1897a8845d0edb198cec69ac5f1f299dd (patch)
tree32cab402e51882c7854eab20556f0da75525cdc7 /include/linux/acpi.h
parenta64e62a07097f67108f0b68bc15216c3a4a5299b (diff)
acpi,msi-laptop: Fall back to EC polling mode for MSI laptop specific EC commands
The ACPI EC that is used in MSI laptops knows some non-standard commands for changing the screen brighntess and a few other things, which are used by the msi-laptop.c driver. Unfortunately for these commands no GPE events for IBF and OBF are triggered. Since nowadays the EC code uses the ec_intr=1 mode by default, this causes these operations to timeout, although they don't fail. In result, all operations that you can do with the msi-laptop.c driver take more or less 1s to complete, which is awfully slow. In one of the more recent kernels (2.6.20?) the EC subsystem has been revamped. With that change the EC timeout has been increased. before that increase the MSI EC accesses were slow -- but not *that* slow, hence I took notice of this limitation of the MSI EC hardware only very recently. The standard EC operations on the MSI EC as defined in the ACPI spec support GPE events properly. The following patch adds a new argument "force_poll" to the ec_transaction() function (and friends). If set to 1, the function will poll for IBF/OBF even if ec_intr=1 is enabled. If set to 0 the current behaviour is used. The msi-laptop driver is modified to make use of this new flag, so that OBF/IBF is polled for the special MSI EC transactions -- but only for them. Signed-off-by: Lennart Poettering <mzxreary@0pointer.de> Acked-by: Alexey Starikovskiy <aystarik@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 8bcfaa4c66ae..fccd8b548d93 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -182,7 +182,8 @@ extern int ec_read(u8 addr, u8 *val);
182extern int ec_write(u8 addr, u8 val); 182extern int ec_write(u8 addr, u8 val);
183extern int ec_transaction(u8 command, 183extern int ec_transaction(u8 command,
184 const u8 *wdata, unsigned wdata_len, 184 const u8 *wdata, unsigned wdata_len,
185 u8 *rdata, unsigned rdata_len); 185 u8 *rdata, unsigned rdata_len,
186 int force_poll);
186 187
187#endif /*CONFIG_ACPI_EC*/ 188#endif /*CONFIG_ACPI_EC*/
188 189