aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
Commit message (Collapse)AuthorAge
* 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>
* | ACPI: ec: Remove expect_event and all races around it.Alexey Starikovskiy2006-12-08
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: ec: Read status register from check_status() functionAlexey Starikovskiy2006-12-08
| | | | | | | | 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-08
| | | | | | | | | | | | 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-08
| | | | | | | | | | | | 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-08
|/ | | | | | | 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-14
| | | | | 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-14
| | | | | | | 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-14
| | | | | 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-14
| | | | | 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-14
| | | | | 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-14
| | | | | | | 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-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10
| | | | | 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-28
| | | | | | | 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-27
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)Len Brown2006-06-27
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUGThomas Renninger2006-06-26
| | | | | 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-15
|\
| * ACPI: replace spin_lock_irq with mutex for ec poll modeRich Townsend2006-05-19
| | | | | | | | | | | | | | 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-15
|\ \
| * | ACPI: EC acpi-ecdt-uid-hackJiri Slaby2006-04-01
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 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-15
|\ \ | |/ |/|
| * ACPI: execute Notify() handlers on new threadAlexey Starikovskiy2006-06-14
| | | | | | | | | | | | | | | | | | | | | | | | 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-31
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-24
|\ \ \ | | | | | | | | | | | | | | | | | | | | branches into release Signed-off-by: Len Brown <len.brown@intel.com>