summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | ACPI: EC: Restart command even if no interrupts from ECAlexey Starikovskiy2009-10-021-3/+1
|/ | | | | | | | | 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>
* Merge branch 'misc-2.6.32' into releaseLen Brown2009-09-191-0/+1
|\ | | | | | | | | | | | | Conflicts: drivers/pci/dmar.c Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: linux/acpi.h should not include linux/dmi.hLen Brown2009-09-191-0/+1
| | | | | | | | | | | | users of acpi.h that need dmi.h should include it directly. Signed-off-by: Len Brown <len.brown@intel.com>
* | Merge branch 'ec' into releaseLen Brown2009-09-191-100/+50
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/ec.c Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: EC: Drop orphan commentAlexey Starikovskiy2009-08-291-4/+0
| | | | | | | | | | | | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: EC: use BURST mode only for MSI notebooksAlexey Starikovskiy2009-08-291-2/+4
| | | | | | | | | | | | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: EC: Merge IRQ and POLL modesAlexey Starikovskiy2009-08-291-94/+46
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'bjorn-start-stop-2.6.32' into releaseLen Brown2009-09-191-74/+44
|\ \
| * | ACPI: EC: remove .stop() methodBjorn Helgaas2009-06-251-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ACPI: EC: remove .start() methodBjorn Helgaas2009-06-251-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ACPI: EC: move acpi_ec_start() after acpi_ec_add()Bjorn Helgaas2009-06-251-56/+56
| |/ | | | | | | | | | | | | | | | | | | | | | | 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>
* | ACPI: Move definition of PREFIX from acpi_bus.h to internal..hLen Brown2009-08-281-1/+0
|/ | | | | | | | | | | | | 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>
* ACPI: EC: Fix ACPI EC resume non-query interrupt messageAlmer S. Tigelaar2009-04-231-0/+1
| | | | | | | | | | | | | | | | | | 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>
* Merge branch 'constify' into releaseLen Brown2009-04-051-1/+1
|\
| * ACPI: constify VFTs (1/2)Jan Engelhardt2009-04-031-1/+1
| | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Len Brown <len.brown@intel.com>
| |
| \
*-. \ Merge branches 'bugzilla-12461' and 'bugzilla-9998' into releaseLen Brown2009-04-051-8/+22
|\ \ \
| | * | ACPI: EC: Separate delays for MSI hardwareAlexey Starikovskiy2009-04-011-3/+13
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ACPI: EC: Always parse EC deviceAlexey Starikovskiy2009-04-011-5/+9
| |/ | | | | | | | | | | | | | | | | | | 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>
* | ACPI: call acpi_ec_init() explicitly rather than as initcallBjorn Helgaas2009-03-271-6/+1
|/ | | | | | | | | | | 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>
* ACPI: EC: Add delay for slow MSI controllerAlexey Starikovskiy2009-02-211-0/+9
| | | | | | | 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>
* ACPI: Fix crash on ASUS laptopsTero Roponen2009-01-171-1/+1
| | | | | | | | | 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>
* ACPI: EC: Don't trust ECDT tables from ASUSAlexey Starikovskiy2009-01-161-44/+30
| | | | | | | | 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>
* ACPI: EC: Limit workaround for ASUS notebooks even moreAlexey Starikovskiy2009-01-161-1/+2
| | | | | | | 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>
* Merge branch 'fluff' into releaseLen Brown2009-01-091-2/+2
|\
| * ACPI: ec.c, pci_link.c, video_detec.c: staticRoel Kluin2008-12-301-2/+2
| | | | | | | | | | | | | | 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>
| |
| \
*-. \ Merge branches 'release', 'bugzilla-11880', 'bugzilla-12037' and ↵Len Brown2009-01-091-21/+22
|\ \ \ | | |/ | | | | | | 'bugzilla-12257' into release
| * | ACPI: EC: fix compilation warningHannes Eder2008-11-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ACPI: EC: Add some basic check for ECDT dataAlexey Starikovskiy2008-11-261-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ACPI: remove private acpica headers from driver filesLin Ming2008-12-311-1/+0
| | | | | | | | | | | | | | | | | | | | | 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>
* | | ACPI: ec.c: call acpi_get_name to get node nameLin Ming2008-12-311-2/+7
| |/ |/| | | | | | | | | | | | | 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>
* | ACPI: EC: count interrupts only if called from interrupt handler.Alexey Starikovskiy2008-11-261-1/+2
|/ | | | | | | 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>
* Merge branch 'ec' into releaseLen Brown2008-11-111-31/+63
|\
| * ACPI: EC: Don't do transaction from GPE handler in poll mode.Alexey Starikovskiy2008-11-111-3/+6
| | | | | | | | | | | | | | 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>
| * ACPI: EC: lower interrupt storm tresholdAlexey Starikovskiy2008-11-111-1/+1
| | | | | | | | | | | | | | 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>
| * ACPICA: Use spinlock for acpi_{en|dis}able_gpeAlexey Starikovskiy2008-11-111-5/+5
| | | | | | | | | | | | | | | | | | | | 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>
| * ACPI: EC: restart failed commandAlexey Starikovskiy2008-11-111-12/+29
| | | | | | | | | | | | | | | | | | | | 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>
| * ACPI: EC: wait for last write gpeAlexey Starikovskiy2008-11-111-8/+13
| | | | | | | | | | | | | | | | | | 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>
| * ACPI: EC: make kernel messages more useful when GPE storm is detectedAlan Jenkins2008-11-111-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ACPI: EC: revert msleep patchAlexey Starikovskiy2008-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ACPI EC: Fix regression due to use of uninitialized variableAlexey Starikovskiy2008-11-071-1/+2
|/ | | | | | | | | | | | | | | | | 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>
* Merge branch 'ull' into testLen Brown2008-10-221-2/+5
|\ | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/bay.c drivers/acpi/dock.c drivers/ata/libata-acpi.c Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernelsMatthew Wilcox2008-10-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | As of version 2.0, ACPI can return 64-bit integers. The current acpi_evaluate_integer only supports 64-bit integers on 64-bit platforms. Change the argument to take a pointer to an acpi_integer so we support 64-bit integers on all platforms. lenb: replaced use of "acpi_integer" with "unsigned long long" lenb: fixed bug in acpi_thermal_trips_update() Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | Merge branch 'misc' into testLen Brown2008-10-221-2/+2
|\ \
| * | ACPI: catch calls of acpi_driver_data on pointer of wrong typePavel Machek2008-10-101-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | Catch attempts to use of acpi_driver_data on pointers of wrong type. akpm: rewritten to use proper C typechecking and remove the "function"-used-as-lvalue thing. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | Merge branch 'ec' into testLen Brown2008-10-221-183/+191
|\ \
| * | ACPI: EC: Check for IBF=0 periodically if not in GPE modeAlexey Starikovskiy2008-10-161-2/+13
| | | | | | | | | | | | | | | | | | 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>
| * | ACPI: EC: Rename some variablesAlexey Starikovskiy2008-09-291-55/+63
| | | | | | | | | | | | | | | | | | | | | | | | No functional changes. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Acked-by: Rafael J. Wysocki <rjw@suse.com> Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: EC: do transaction from interrupt contextAlexey Starikovskiy2008-09-251-160/+149
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | It is easier and faster to do transaction directly from interrupt context rather than waking control thread. Also, cleaner GPE storm avoidance is implemented. References: http://bugzilla.kernel.org/show_bug.cgi?id=9998 http://bugzilla.kernel.org/show_bug.cgi?id=10724 http://bugzilla.kernel.org/show_bug.cgi?id=10919 http://bugzilla.kernel.org/show_bug.cgi?id=11309 http://bugzilla.kernel.org/show_bug.cgi?id=11549 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: Ignore AE_NOT_FOUND error of EC _REG method and continue to initialize ECZhao Yakui2008-10-171-2/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | On some broken BIOS the ACPI object in EC _REG method can't be found in ACPI namespace, which causes that the status code of AE_NOT_FOUND is returned by the EC _REG object. In such case the EC device can't be initialized correctly, which causes that battery/AC adapter can't work normally. As the EC address space handler is not removed and the memory pointed by its input argument is already free, sometimes the kernel will also be panic when EC internal register is still accessed. But the windows can work well on such broken BIOS. Maybe it will be reasonable that OS ignores the AE_NOT_FOUND error returned by the EC _REG object and continues to initialize EC device on some broken BIOS. For example: the ACPI object in EC _REG method can't be found and status error code is AE_NOT_FOUND. http://bugzilla.kernel.org/show_bug.cgi?id=8953 http://bugzilla.kernel.org/show_bug.cgi?id=10237 lenb: we may find a more general solution to this in the future. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Avoid bogus EC timeout when EC is in Polling modeZhao Yakui2008-08-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When EC is in Polling mode, OS will check the EC status continually by using the following source code: clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); while (time_before(jiffies, delay)) { if (acpi_ec_check_status(ec, event)) return 0; msleep(1); } But msleep is realized by the function of schedule_timeout. At the same time although one process is already waken up by some events, it won't be scheduled immediately. So maybe there exists the following phenomena: a. The current jiffies is already after the predefined jiffies. But before timeout happens, OS has no chance to check the EC status again. b. If preemptible schedule is enabled, maybe preempt schedule will happen before checking loop. When the process is resumed again, maybe timeout already happens, which means that OS has no chance to check the EC status. In such case maybe EC status is already what OS expects when timeout happens. But OS has no chance to check the EC status and regards it as AE_TIME. So it will be more appropriate that OS will try to check the EC status again when timeout happens. If the EC status is what we expect, it won't be regarded as timeout. Only when the EC status is not what we expect, it will be regarded as timeout, which means that EC controller can't give a response in time. http://bugzilla.kernel.org/show_bug.cgi?id=9823 http://bugzilla.kernel.org/show_bug.cgi?id=11141 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
OpenPOWER on IntegriCloud