summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'acpica' of ↵Linus Torvalds2010-03-011-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: replace acpi_integer by u64 ACPICA: Update version to 20100121. ACPICA: Remove unused uint32_struct type ACPICA: Disassembler: Remove obsolete "Integer64" field in parse object ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type ACPICA: Predefined name repair: fix NULL package elements ACPICA: AcpiGetDevices: Eliminate unnecessary _STA calls ACPICA: Update all ACPICA copyrights and signons to 2010 ACPICA: Update for new gcc-4 warning options
| * ACPI: replace acpi_integer by u64Lin Ming2010-01-281-2/+2
| | | | | | | | | | | | | | | | acpi_integer is now obsolete and removed from the ACPICA code base, replaced by u64. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: Use GPE reference counting to support shared GPEsRafael J. Wysocki2010-02-241-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To fix a bug and address the reviewers' comments regarding the ACPI GPE refcounting patch, do the following additional changes: o Remove the second argument of acpi_ev_enable_gpe(), 'write_to_hardware', because it is not necessary any more. o Add the "bad parameter" test against 'type' in acpi_enable_gpe() and acpi_disable_gpe(). o Make acpi_enable_gpe() only check 'status' for runtime GPEs if acpi_ev_enable_gpe() was actually called. o Make acpi_disable_gpe() return 'status' returned by acpi_ev_disable_gpe() and fix a bug where ACPI_GPE_TYPE_WAKE and ACPI_GPE_TYPE_RUNTIME were exchanged by mistake. o Add comments explaining why acpi_set_gpe() is used by the ACPI EC driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* | ACPI: Use GPE reference counting to support shared GPEsRafael J. Wysocki2010-02-221-6/+8
|/ | | | | | | | | | | | | | | | | | | | | ACPI GPEs may map to multiple devices. The current GPE interface only provides a mechanism for enabling and disabling GPEs, making it difficult to change the state of GPEs at runtime without extensive cooperation between devices. Add an API to allow devices to indicate whether or not they want their device's GPE to be enabled for both runtime and wakeup events. Remove the old GPE type handling entirely, which gets rid of various quirks, like the implicit disabling with GPE type setting. This requires a small amount of rework in order to ensure that non-wake GPEs are enabled by default to preserve existing behaviour. Based on patches from Matthew Garrett <mjg@redhat.com>. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* ACPI: EC: Add wait for irq stormAlexey Starikovskiy2010-01-151-1/+2
| | | | | | | | | | | | 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>
* ACPI: SBS: Move SBS HC callback to faster Notify queueAlexey Starikovskiy2010-01-151-1/+2
| | | | | | | | SBS transactions should happen in Notify work queue, to not create a dead lock with GPE execution accessing SBS devices. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: EC: Accelerate query executionAlexey Starikovskiy2009-12-241-45/+77
| | | | | | | | | | | 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>
*-. Merge branches 'bugzilla-14446', 'bugzilla-14753' and 'bugzilla-14824' into ↵Len Brown2009-12-241-2/+8
|\ \ | | | | | | | | | release
| * | ACPI: EC: Fix MSI DMI detectionAlexey Starikovskiy2009-12-221-2/+8
| |/ | | | | | | | | | | | | | | | | | | MSI strings should be ORed, not ANDed. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14446 cc: stable@kernel.org Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPICA: Add post-order callback to acpi_walk_namespaceLin Ming2009-11-241-1/+1
|/ | | | | | | | | | | | | | The existing interface only has a pre-order callback. This change adds an additional parameter for a post-order callback which will be more useful for bus scans. ACPICA BZ 779. Also update the external calls to acpi_walk_namespace. http://www.acpica.org/bugzilla/show_bug.cgi?id=779 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'bugzilla-14081' into releaseLen Brown2009-10-031-6/+46
|\
| * ACPI: EC: Don't parse DSDT for EC early init on CompalAlexey Starikovskiy2009-10-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | 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>
| * ACPI: EC: Rewrite DMI checksAlexey Starikovskiy2009-10-031-6/+31
| | | | | | | | | | | | | | | | | | | | 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>
* | 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>
OpenPOWER on IntegriCloud