summaryrefslogtreecommitdiff
path: root/drivers/acpi/ec.c
AgeCommit message (Collapse)Author
2011-01-07ACPI: EC: Add another dmi match entry for MSI hardwareAlexey Starikovskiy
commit a5dc4f898c2a0f66e2cefada6c687db82ba2fcbc upstream. http://bugzilla.kernel.org/show_bug.cgi?id=15418 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-26ACPI: EC: Allow multibyte access to ECAlexey Starikovskiy
commit dadf28a10c3eb29421837a2e413ab869ebd upstream http://bugzilla.kernel.org/show_bug.cgi?id=14667 [bwh: Backport to 2.6.32; same applies to 2.6.33] Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-25ACPI: EC: Add wait for irq stormAlexey Starikovskiy
commit 54070101f86ca9a6e9ba243c999d144721ec3db7 upstream. Merge of poll and irq modes accelerated EC transaction, so that keyboard starts to suffer again. Add msleep(1) into transaction path for the storm to allow keyboard controller to do its job. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14747 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> Cc: François Valenduc <francois.valenduc@tvcablenet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-25ACPI: EC: Accelerate query executionAlexey Starikovskiy
commit a62e8f1978f49e52f87a711ff6711b323d4b12ff upstream. Split EC query handling into acknowledge and execution phase. This allows much smaller pending query lattency and lowers chances of EC going "wild" and losing events. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14858 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> Cc: François Valenduc <francois.valenduc@tvcablenet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-06ACPI: EC: Fix MSI DMI detectionAlexey Starikovskiy
commit 55b313f249e11b815fd0be51869f166aaf368f44 upstream. MSI strings should be ORed, not ANDed. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14446 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-03Merge branch 'bugzilla-14081' into releaseLen Brown
2009-10-03ACPI: EC: Don't parse DSDT for EC early init on CompalAlexey Starikovskiy
Compal DSDT breaks if scanned early, while we need early scan for almost all ASUS machines. Safest workaround seems to be to continue do an early scan for all machines, but this Compal model. http://bugzilla.kernel.org/show_bug.cgi?id=14086 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-10-03ACPI: EC: Rewrite DMI checksAlexey Starikovskiy
Use dmi_check_system() for DMI matching. Don't use string "Notebook" for matching MSI hardware. http://bugzilla.kernel.org/show_bug.cgi?id=14081 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-10-02ACPI: EC: Restart command even if no interrupts from ECAlexey Starikovskiy
EC may forget a command without sending any "reset" interrupt, thus we need to lessen the requirement for transaction restart. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14247 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-09-19Merge branch 'misc-2.6.32' into releaseLen Brown
Conflicts: drivers/pci/dmar.c Signed-off-by: Len Brown <len.brown@intel.com>
2009-09-19Merge branch 'ec' into releaseLen Brown
Conflicts: drivers/acpi/ec.c Signed-off-by: Len Brown <len.brown@intel.com>
2009-09-19Merge branch 'bjorn-start-stop-2.6.32' into releaseLen Brown
2009-09-19ACPI: linux/acpi.h should not include linux/dmi.hLen Brown
users of acpi.h that need dmi.h should include it directly. Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-29ACPI: EC: Drop orphan commentAlexey Starikovskiy
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-29ACPI: EC: use BURST mode only for MSI notebooksAlexey Starikovskiy
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-29ACPI: EC: Merge IRQ and POLL modesAlexey Starikovskiy
In general, EC transaction should complete in less than 1ms, thus it is possible to merge wait for 1ms in poll mode and 1ms of interrupt transaction timeout. Still, driver will wait 500ms for EC to complete transaction. This significantly simplifies driver and makes it immune to problematic EC interrupt implementations. It also may lessen kernel start-up time by 500ms. References: http://bugzilla.kernel.org/show_bug.cgi?id=12949 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-28ACPI: Move definition of PREFIX from acpi_bus.h to internal..hLen Brown
Linux/ACPI core files using internal.h all PREFIX "ACPI: ", however, not all ACPI drivers use/want it -- and they should not have to #undef PREFIX to define their own. Add GPL commment to internal.h while we are there. This does not change any actual console output, asside from a whitespace fix. Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-25ACPI: EC: remove .stop() methodBjorn Helgaas
This patch folds the .stop() method into .remove(). acpi_ec_stop() is only called via acpi_device_probe() and acpi_device_remove(), and in both cases it is called immediately before acpi_ec_remove(), so there's no need to have it be a separate method. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-25ACPI: EC: remove .start() methodBjorn Helgaas
This patch folds the .start() method into .add(). acpi_ec_start() is always called immediately after acpi_ec_add(), so there's no need to have it be a separate method. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-06-25ACPI: EC: move acpi_ec_start() after acpi_ec_add()Bjorn Helgaas
This patch rearranges ec_install_handlers() and acpi_ec_start() so acpi_ec_start() ends up just after acpi_ec_add(). A subsequent patch will merge them. Code movement only; no functional change. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-23ACPI: EC: Fix ACPI EC resume non-query interrupt messageAlmer S. Tigelaar
When resuming from standby (on a laptop) I see the following message in my kernel.log: "ACPI: EC: non-query interrupt received, switching to interrupt mode" This apparently prevented sony-laptop to properly restore the brightness level on resume. The cause: In drivers/acpi/ec.c the acpi_ec_suspend function clears the GPE mode bit, but this is not restored in acpi_ec_resume (the function below it). The patch below fixes this by properly restoring the GPE_MODE bit. Tested and confirmed to work. Signed-off-by: Almer S. Tigelaar <almer@gnome.org> Signed-off-by: Mattia Dongili <malattia@linux.it> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05Merge branch 'constify' into releaseLen Brown
2009-04-05Merge branches 'bugzilla-12461' and 'bugzilla-9998' into releaseLen Brown
2009-04-03ACPI: constify VFTs (1/2)Jan Engelhardt
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-01ACPI: EC: Always parse EC deviceAlexey Starikovskiy
If ECDT info is not valid, we have last chance to configure EC driver properly at this point, don't miss it. http://bugzilla.kernel.org/show_bug.cgi?id=12461 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-01ACPI: EC: Separate delays for MSI hardwareAlexey Starikovskiy
MSI notebooks require very strict delays, while all others are happy with msleep(). References: http://bugzilla.kernel.org/show_bug.cgi?id=9998 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPI: call acpi_ec_init() explicitly rather than as initcallBjorn Helgaas
This patch makes acpi_init() call acpi_ec_init() directly. Previously, both were subsys_initcalls. acpi_ec_init() must happen after acpi_init(), and it's better to call it explicitly rather than rely on link ordering. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-02-21ACPI: EC: Add delay for slow MSI controllerAlexey Starikovskiy
http://bugzilla.kernel.org/show_bug.cgi?id=12011 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-17ACPI: Fix crash on ASUS laptopsTero Roponen
This patch fixes the crash I experienced in 2.6.29-rc2. Tested on ASUS M50vm. Signed-off-by: Tero Roponen <tero.roponen@gmail.com> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-16ACPI: EC: Don't trust ECDT tables from ASUSAlexey Starikovskiy
http://bugzilla.kernel.org/show_bug.cgi?id=9399 http://bugzilla.kernel.org/show_bug.cgi?id=11880 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-16ACPI: EC: Limit workaround for ASUS notebooks even moreAlexey Starikovskiy
References: http://bugzilla.kernel.org/show_bug.cgi?id=11884 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09Merge branch 'fluff' into releaseLen Brown
2009-01-09Merge branches 'release', 'bugzilla-11880', 'bugzilla-12037' and ↵Len Brown
'bugzilla-12257' into release
2008-12-31ACPI: remove private acpica headers from driver filesLin Ming
External driver files should not include any private acpica headers. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-31ACPI: ec.c: call acpi_get_name to get node nameLin Ming
acpi_namespace_node is internal struct, it should not be used outside of ACPICA call acpi_get_name to get node ascii name Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30ACPI: ec.c, pci_link.c, video_detec.c: staticRoel Kluin
Sparse asked whether these could be static. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-30ACPI: EC: fix compilation warningHannes Eder
Fix the warning introduced in commit c5279dee26c0e8d7c4200993bfc4b540d2469598, and give the dummy variable a more verbose name. drivers/acpi/ec.c: In function 'acpi_ec_ecdt_probe': drivers/acpi/ec.c:1015: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Hannes Eder <hannes@hanneseder.net> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-26ACPI: EC: count interrupts only if called from interrupt handler.Alexey Starikovskiy
fix 2.6.28 EC interrupt storm regression Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-26ACPI: EC: Add some basic check for ECDT dataAlexey Starikovskiy
One more ASUS comes with empty ECDT, add a guard for it... http://bugzilla.kernel.org/show_bug.cgi?id=11880 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-11Merge branch 'ec' into releaseLen Brown
2008-11-11ACPI: EC: Don't do transaction from GPE handler in poll mode.Alexey Starikovskiy
Referencies: http://bugzilla.kernel.org/show_bug.cgi?id=12004 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-11ACPI: EC: lower interrupt storm tresholdAlexey Starikovskiy
http://bugzilla.kernel.org/show_bug.cgi?id=11892 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-11ACPICA: Use spinlock for acpi_{en|dis}able_gpeAlexey Starikovskiy
Disabling gpe might interfere with gpe detection/handling, thus producing "interrupt not handled" errors. Ironically, disabling of GPE from interrupt context is already under spinlock, so only userspace needs to start using it. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-11ACPI: EC: restart failed commandAlexey Starikovskiy
Restart current transaction if we recieved unexpected GPEs instead of needed ones. http://bugzilla.kernel.org/show_bug.cgi?id=11896 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-11ACPI: EC: wait for last write gpeAlexey Starikovskiy
There is a possibility that EC might break if next command is issued within 1 us after write or burst-disable command. Suggestd-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-11ACPI: EC: make kernel messages more useful when GPE storm is detectedAlan Jenkins
Make sure we can tell if the GPE storm workaround gets activated, and avoid flooding the logs afterwards. http://bugzilla.kernel.org/show_bug.cgi?id=11841 "plenty of line "ACPI: EC: non-query interrupt received, switching to interrupt mode" in dmesg" Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-11ACPI: EC: revert msleep patchAlexey Starikovskiy
With the better solution for EC interrupt storm issue, there is no need to use msleep over udelay. References: http://bugzilla.kernel.org/show_bug.cgi?id=11810 http://bugzilla.kernel.org/show_bug.cgi?id=10724 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-07ACPI EC: Fix regression due to use of uninitialized variableAlexey Starikovskiy
breakage introduced by following patch commit 27663c5855b10af9ec67bc7dfba001426ba21222 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri Oct 10 02:22:59 2008 -0400 acpi_evaluate_integer() does not clear passed variable if there is an error at evaluation. So if we ignore error, we must supply initialized variable. http://bugzilla.kernel.org/show_bug.cgi?id=11917 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-22Merge branch 'ull' into testLen Brown
Conflicts: drivers/acpi/bay.c drivers/acpi/dock.c drivers/ata/libata-acpi.c Signed-off-by: Len Brown <len.brown@intel.com>
2008-10-22Merge branch 'misc' into testLen Brown