aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
Commit message (Collapse)AuthorAgeFilesLines
* Pull fluff into release branchLen Brown2007-02-161-3/+2
|\ | | | | | | | | | | | | | | | | 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-121-1/+0
| | | | | | | | | | | | | | | | | | 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-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-121-1/+1
| | | | | | | | | | | | | | | | | | | | 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-161-1/+3
|/ | | | | 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-021-1/+2
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: Remove duplicate table definitions.Alexey Starikovskiy2007-02-021-4/+4
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPICA: minimal patch to integrate new tables into LinuxAlexey Starikovskiy2007-02-021-3/+1
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: ec: enable printk on cmdline useLen Brown2007-01-061-2/+2
| | | | | | | 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-021-1/+1
| | | | | | | | | 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-201-6/+3
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull ec into test branchLen Brown2006-12-201-1/+1
|\
| * ACPI: make drivers/acpi/ec.c:ec_ecdt staticAdrian Bunk2006-12-201-1/+1
| | | | | | | | | | | | 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-161-1/+1
|\ \ | |/ |/| | | | | | | Conflicts: drivers/acpi/ec.c
| * ACPI: make ec_transaction not externRandy Dunlap2006-10-271-1/+1
| | | | | | | | | | | | | | | | | | 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-081-95/+76
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Change #define to enums there possible.Alexey Starikovskiy2006-12-081-12/+12
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Style changes.Alexey Starikovskiy2006-12-081-10/+6
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Acquire Global Lock under EC mutex.Alexey Starikovskiy2006-12-081-2/+2
| | | | | | | | 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-081-5/+2
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Rename gpe_bit to gpeAlexey Starikovskiy2006-12-081-21/+21
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Change semaphore to mutex.Alexey Starikovskiy2006-12-081-6/+6
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Query only single query at a time.Alexey Starikovskiy2006-12-081-11/+8
| | | | | | | | 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-081-8/+4
| | | | | | | | | | | | dispatch_gpe() level. Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Remove expect_event and all races around it.Alexey Starikovskiy2006-12-081-46/+38
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Read status register from check_status() functionAlexey Starikovskiy2006-12-081-5/+6
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Increase timeout from 50 to 500 ms to handle old slow machines.Alexey Starikovskiy2006-12-081-2/+2
| | | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=7466 Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Enable EC GPE at beginning of transactionAlexey Starikovskiy2006-12-081-0/+3
| | | | | | | | | | | | Temporary measure until resume sequence is right. Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Allow for write semantics in any command.Alexey Starikovskiy2006-12-081-1/+1
|/ | | | | | | Check for transaction attributes, not command index to decide on event to expect. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: export ec_transaction() for msi-laptop driverLennart Poettering2006-10-141-0/+2
| | | | | Signed-off-by: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Simplify acpi_hw_low_level*() with inb()/outb().Denis M. Sadykov2006-10-141-79/+45
| | | | | | | Simplify acpi_hw_low_level_xxx() functions to inb() and outb(). Signed-off-by: Alexey Y. Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Unify poll and interrupt gpe handlersDenis M. Sadykov2006-10-141-95/+12
| | | | | Signed-off-by: Alexey Y. Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Unify poll and interrupt mode transaction functionsDenis M. Sadykov2006-10-141-81/+29
| | | | | Signed-off-by: Alexey Y. Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Remove unused variables and duplicated codeDenis M. Sadykov2006-10-141-458/+253
| | | | | Signed-off-by: Alexey Y. Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Remove unnecessary delay added by previous transation patch.Denis M. Sadykov2006-10-141-53/+50
| | | | | | | Remove unnecessary delay (50 ms) while reading data from EC in interrupt mode. Signed-off-by: Alexey Y. Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: consolidate functions in acpi ec driverLennart Poettering2006-10-141-230/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify the following functions: acpi_ec_poll_read() acpi_ec_poll_write() acpi_ec_poll_query() acpi_ec_intr_read() acpi_ec_intr_write() acpi_ec_intr_query() into: acpi_ec_poll_transaction() acpi_ec_intr_transaction() These new functions take as arguments an ACPI EC command, a few bytes to write to the EC data register and a buffer for a few bytes to read from the EC data register. The old _read(), _write(), _query() are just special cases of these functions. Then unified the code in acpi_ec_poll_transaction() and acpi_ec_intr_transaction() a little more. Both functions are now just wrappers around the new acpi_ec_transaction_unlocked() function. The latter contains the EC access logic, the two original function now just do their special way of locking and call the the new function for the actual work. This saves a lot of very similar code. The primary reason for doing this, however, is that my driver for MSI 270 laptops needs to issue some non-standard EC commands in a safe way. Due to this I added a new exported function similar to ec_write()/ec_write() which is called ec_transaction() and is essentially just a wrapper around acpi_ec_{poll,intr}_transaction(). Signed-off-by: Lennart Poettering <mzxreary@0pointer.de> Acked-by: Luming Yu <luming.yu@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: add 'const' to several ACPI file_operationsArjan van de Ven2006-07-101-1/+1
| | | | | Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: fix battery on HP NX6125Vladimir Lebedev2006-06-281-2/+5
| | | | | | | EC problem was cause of both battery and AC issues. http://bugzilla.kernel.org/show_bug.cgi?id=6455 Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: delete tracing macros from drivers/acpi/*.cPatrick Mochel2006-06-271-84/+62
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)Len Brown2006-06-271-2/+2
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUGThomas Renninger2006-06-261-11/+6
| | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull bugzilla-5764 into release branchLen Brown2006-06-151-22/+29
|\
| * ACPI: replace spin_lock_irq with mutex for ec poll modeRich Townsend2006-05-191-22/+29
| | | | | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=5764 Signed-off-by: Luming Yu <luming.yu@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull ec into release branchLen Brown2006-06-151-10/+6
|\ \
| * | ACPI: EC acpi-ecdt-uid-hackJiri Slaby2006-04-011-10/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | On some boxes ecdt uid may be equal to 0, so do not test for uids equality, so that fake handler will be unconditionally removed to allow loading the real one. See http://bugzilla.kernel.org/show_bug.cgi?id=6111 Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Luming Yu <luming.yu@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull acpica into release branchLen Brown2006-06-151-3/+2
|\ \ | |/ |/|
| * ACPI: execute Notify() handlers on new threadAlexey Starikovskiy2006-06-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=5534 Thanks to Peter Wainwright for isolating the issue. Thanks to Andi Kleen and Bob Moore for feedback. Thanks to Richard Mace and others for testing. Updates by Konstantin Karasyov. Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | [PATCH] Don't pass boot parameters to argv_init[]OGAWA Hirofumi2006-03-311-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The boot cmdline is parsed in parse_early_param() and parse_args(,unknown_bootoption). And __setup() is used in obsolete_checksetup(). start_kernel() -> parse_args() -> unknown_bootoption() -> obsolete_checksetup() If __setup()'s callback (->setup_func()) returns 1 in obsolete_checksetup(), obsolete_checksetup() thinks a parameter was handled. If ->setup_func() returns 0, obsolete_checksetup() tries other ->setup_func(). If all ->setup_func() that matched a parameter returns 0, a parameter is seted to argv_init[]. Then, when runing /sbin/init or init=app, argv_init[] is passed to the app. If the app doesn't ignore those arguments, it will warning and exit. This patch fixes a wrong usage of it, however fixes obvious one only. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
*---. [ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi ↵Len Brown2006-01-241-143/+148
|\ \ \ | | | | | | | | | | | | | | | | | | | | branches into release Signed-off-by: Len Brown <len.brown@intel.com>
| | | * [ACPI] ACPICA 20050930Bob Moore2005-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completed a major overhaul of the Resource Manager code - specifically, optimizations in the area of the AML/internal resource conversion code. The code has been optimized to simplify and eliminate duplicated code, CPU stack use has been decreased by optimizing function parameters and local variables, and naming conventions across the manager have been standardized for clarity and ease of maintenance (this includes function, parameter, variable, and struct/typedef names.) All Resource Manager dispatch and information tables have been moved to a single location for clarity and ease of maintenance. One new file was created, named "rsinfo.c". The ACPI return macros (return_ACPI_STATUS, etc.) have been modified to guarantee that the argument is not evaluated twice, making them less prone to macro side-effects. However, since there exists the possibility of additional stack use if a particular compiler cannot optimize them (such as in the debug generation case), the original macros are optionally available. Note that some invocations of the return_VALUE macro may now cause size mismatch warnings; the return_UINT8 and return_UINT32 macros are provided to eliminate these. (From Randy Dunlap) Implemented a new mechanism to enable debug tracing for individual control methods. A new external interface, acpi_debug_trace(), is provided to enable this mechanism. The intent is to allow the host OS to easily enable and disable tracing for problematic control methods. This interface can be easily exposed to a user or debugger interface if desired. See the file psxface.c for details. acpi_ut_callocate() will now return a valid pointer if a length of zero is specified - a length of one is used and a warning is issued. This matches the behavior of acpi_ut_allocate(). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>