aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
Commit message (Collapse)AuthorAge
* ACPI: EC: Check if boot_ec was really found in DSDTAlexey Starikovskiy2007-08-31
| | | | | | | | | | acpi_get_devices() returns success if it did not find any device. We have to check for this case. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Tested-by: Daniel Ritz <daniel.ritz-ml@swissonline.ch> Tested-by: Luca <kronos.it@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ACPI: EC: revert fix for bugzilla 8709Alexey Starikovskiy2007-08-24
| | | | | | | | This is a manual revert of 7c010de7506954e973abfab5c5999c5a97f7a73e, a fix that broke another ASUS in 8909 and 8919. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Fix "no battery" regressionAlexey Starikovskiy2007-08-14
| | | | | | | | | Restore deleted call to register query methods. http://bugzilla.kernel.org/show_bug.cgi?id=8886 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI EC: remove potential deadlock from ECAlexey Starikovskiy2007-08-11
| | | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: fix run-together printk linesMeelis Roos2007-08-03
| | | | | Signed-off-by: Meelis Roos <mroos@linux.ee> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: acpi_ec_remove(): fix use-after-freeAdrian Bunk2007-08-03
| | | | | | | | | | | This patch fixes an obvious use-after-free introduced by commit 837012ede14a8fc088be3682c964da7fc6af026b. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Switch from boot_ec as soon as we find its desc in DSDT.Alexey Starikovskiy2007-08-03
| | | | | | | | | | Some ASUS laptops fail to use boot time EC and need to eventually switch to one described in DSDT. http://bugzilla.kernel.org/show_bug.cgi?id=8709 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: fix build warningLen Brown2007-08-03
| | | | | | drivers/acpi/ec.c:657: warning: ‘acpi_ec_register_query_methods’ defined but not used Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: If ECDT is not found, look up EC in DSDT.Alexey Starikovskiy2007-08-03
| | | | | | | | | | | | | | Some ASUS laptops access EC space from device _INI methods, but do not provide ECDT for early EC setup. In order to make them function properly, there is a need to find EC is DSDT before any _INI is called. Similar functionality was turned on by acpi_fake_ecdt=1 command line before. Now it is on all the time. http://bugzilla.kernel.org/show_bug.cgi?id=8598 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Remove noisy debug printk fron EC driver.Alexey Starikovskiy2007-08-03
| | | | | | | ACPI: EC: Handler for query 0x57 is not found! Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI ↵Thomas Renninger2007-07-23
| | | | | | | | | | drivers modpost is going to use these to create e.g. acpi:ACPI0001 in modules.alias. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI EC: Add support for non-AML EC query handlersAlexey Starikovskiy2007-06-23
| | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI EC: drop usage of ACPI_DEBUG_PRINT as too heavy weightAlexey Starikovskiy2007-06-23
| | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI EC: Re-factor EC space handler to avoid using label/goto for cycle.Alexey Starikovskiy2007-06-23
| | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* acpi,msi-laptop: Fall back to EC polling mode for MSI laptop specific EC ↵Lennart Poettering2007-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ACPI: EC: Block queries until EC is fully initializedAlexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Cleanup of EC initializationAlexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: first_ec is better to be acpi_ec than acpi_device.Alexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Rename ec_ecdt to more informative boot_ecAlexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Clean ECDT and namespace parsing.Alexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Put install handlers into separate function.Alexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Remove casts to/from void* from ec.cAlexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: enable burst functionality in EC.Alexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: "Fake ECDT" workaround is not needed any longer.Alexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Don't use Global Lock if not asked to do soAlexey Starikovskiy2007-03-09
| | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: ec: fix race in status register accessAlexey Starikovskiy2007-03-09
| | | | | | | | | | | | | | | | | | | Delay the read of the EC status register until after the event that caused it occurs -- otherwise it is possible to read and act on stale status that was associated with the previous event. Do this with a perpetually incrementing "event_count" to detect when a new event occurs and it is safe to read status. There is no workaround for polling mode -- it is inherently exposed to reading and acting on stale status, since it doesn't have an interrupt to tell it the event completed. http://bugzilla.kernel.org/show_bug.cgi?id=8110 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull fluff into release branchLen Brown2007-02-16
|\ | | | | | | | | | | | | | | | | Conflicts: arch/x86_64/pci/mmconfig.c drivers/acpi/bay.c Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown2007-02-12
| | | | | | | | | | | | | | | | | | Cosmetic only. Except in a single case, #define ACPI_*_DRIVER_NAME were invoked 0 or 1 times. Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: fix acpi_driver.name usageLen Brown2007-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was erroneously used as a description rather than a name. ie. turn this: lenb@se7525gp2:/sys> ls bus/acpi/drivers ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver ACPI container driver ACPI PCI Root Bridge Driver hpet into this: lenb@se7525gp2:~> ls /sys/bus/acpi/drivers ac battery button container ec fan hpet pci_link pci_root power processor thermal Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: clean up ACPI_MODULE_NAME() useLen Brown2007-02-12
| | | | | | | | | | | | | | | | | | | | cosmetic only Make "module name" actually match the file name. Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care. Fix indentation where Lindent did get confused. Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: add unlock in error pathAlexey Starikovskiy2007-02-16
|/ | | | | Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Remove duplicate table definitions (non-conflicting), contAlexey Starikovskiy2007-02-02
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Remove duplicate table definitions.Alexey Starikovskiy2007-02-02
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: minimal patch to integrate new tables into LinuxAlexey Starikovskiy2007-02-02
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: ec: enable printk on cmdline useLen Brown2007-01-06
| | | | | | | if somebody uses "ec_intr=", lets be sure to capture that in the dmesg even in the non-debug case. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: move verbose printk to debug build onlyGuillaume Chazarain2007-01-02
| | | | | | | | | The recent EC cleanup left a printk enabled on handler evaluation resulting in a bunch of messages on normal operation, like so: ACPI: EC: evaluating _Q60 Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: replace kmalloc+memset with kzallocBurman Yan2006-12-20
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull ec into test branchLen Brown2006-12-20
|\
| * ACPI: make drivers/acpi/ec.c:ec_ecdt staticAdrian Bunk2006-12-20
| | | | | | | | | | | | Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull trivial into test branchLen Brown2006-12-16
|\ \ | |/ |/| | | | | | | Conflicts: drivers/acpi/ec.c
| * ACPI: make ec_transaction not externRandy Dunlap2006-10-27
| | | | | | | | | | | | | | | | | | Fix sparse warning: drivers/acpi/ec.c:372:12: warning: function 'ec_transaction' with external linkage has definition Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Lindent once againAlexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Change #define to enums there possible.Alexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Style changes.Alexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Acquire Global Lock under EC mutex.Alexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.Alexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Rename gpe_bit to gpeAlexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Change semaphore to mutex.Alexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Query only single query at a time.Alexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Remove calls to clear_gpe() and enable_gpe(), as these are handled atAlexey Starikovskiy2006-12-08
| | | | | | | | | | | | dispatch_gpe() level. Signed-off-by: Len Brown <len.brown@intel.com>