summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
AgeCommit message (Collapse)Author
2014-03-24add support for aux button strip on newer thinkpads like the 2ndjoshua stein
generation x1 carbon that have done away with regular F1-F12 keys from rivo nurges <rix at estpak.ee> and reportedly tested on x1 carbon, x220, and x61s
2014-03-13Update the _OSI list to include newer Redmond products which may be requestedBryan Steele
by newer firmware. May cause problems with brightness control on some systems. "lets see what happens" kettenis@, and.. deraadt@ agrees (..hopefully).
2014-03-13get rid of the assumption that the head of the alldevs list is theDavid Gwynne
"mainbus" device. this breaks when mpath is enabled because it attaches before mainbus and therefore takes the head position. have autoconf provide device_mainbus() which looks up mainbus_cd, and use that instead. discussed with deraadt who just wants mpath stuff to move forward despite there being many ways to shine this particular turd.
2014-03-05force cfattach decl to same form as othersTheo de Raadt
2014-02-21Do the lid control further on in the resume sequence, since this isTheo de Raadt
AML, and will do WAITOK operations. While cold, that is a bad idea. We seem to be safe with respect to the spec, I do not see any event debounce issues here. ok kettenis, tested by many
2014-02-21these two drivers should be doing their repair at DVACT_WAKEUP timeTheo de Raadt
rather than DVACT_RESUME in snapshots for a long time, looked at by pirofti kettenis mlarkin
2014-02-21remove stray printf; ok piroftiTheo de Raadt
2014-01-30The activate function was registered as a detach function.Paul Irofti
Put the activate function in the proper place in cfattach. Tested by jasper@ on eeepc-900 Okay kettenis@
2014-01-20Instead of checking sc->sc_revision <= 1 check that theClaudio Jeker
fadt->hdr_revision <= 1. This is a better check since it checks the version of the proper descriptor. This allows the alix APU to reboot since those boards have currently a wrong sc->sc_revision. Committing this now so that it can be tested easier. With and OK jsg@ also fine by derradt@
2014-01-05Don't use the first 64KB for anything, including tramps. Move tramps andMike Larkin
hibernate goo up after 64KB to avoid posible corruption by buggy BIOS SMM code. Diff also ensures the first 64KB doesn't get handed to UVM either. ok deraadt@, tested by many with no regressions reported
2013-12-24If the FADT has its SMI_CMD set to zero, assume we're only ACPI-only hardwareMark Kettenis
and don't need to disable SMI ownership of the ACPI hardware registers. ok mlarkin@
2013-12-23Revert previous commit. It makes resume hang on some MP systems runningMark Kettenis
GENERIC.MP.
2013-12-22Bail out early if the PCI bus number is -1. This means the hardware isn'tMark Kettenis
there and the AML might reference stuff that isn't there.
2013-12-21save/restore hpet configuration. Perhaps a little more than weTheo de Raadt
need to do, since we do not use many hpet features. ok kettenis millert
2013-12-19be more careful during suspend/resume cycles, as roughly detailed in theTheo de Raadt
spec. More might be required. ok jordan matthew mlarkin
2013-12-17do not put a second : in a dmesg line, use , insteadTheo de Raadt
2013-12-16Restore hw.setperf upon resume like we do for apm(4) on i386. Seems we needMark Kettenis
to do this fairly late in the resume to avoid hangs. ok deraadt@, mlarkin@
2013-12-12Add db_vprintf(), and then use it in ACPI's db_disprint() instead ofPhilip Guenther
formatting into a local buffer. ok miod@
2013-12-12printf(variable) --> printf("%s", variable)Philip Guenther
ok deraadt@
2013-12-06Add a DVACT_WAKEUP op to the *_activate() API. This is called after theTheo de Raadt
kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
2013-11-18format string cleanupTheo de Raadt
2013-11-06Add support for Power Resources for Dx states and the necessary hookMartin Pieuchot
for PCI devices. This hook should be called twice, before and after changing the power state of a PCI device. Before setting the device to the new state, the ACPI layer will notify every power resources linked to the device for that state and make sure they are turned "_ON". After changing the state of the device, it will decrement the reference of every power resources linked to that device for the old state and turn them "_OFF" if they are no longer referenced. This fixes the no-USB after resume problem seen on various ThinkPad, problem initialy diagnosed with Alexander Polakov. ok kettenis@, deraadt@
2013-11-04Enable locking of fields using the acpi global lock if required. Seems to fixMark Kettenis
a couple of machines and so far caused no regressions. Pt this in the tree now to get wider testing. ok deraadt@
2013-11-04Convert wskbd_set_mixervolume() to use a task internally instead ofMartin Pieuchot
being called in a workq. ok kettenis@
2013-10-30Add "handling" for dock/undock events for non-ACPI docks to acpithinkpad.Mike Larkin
The "handling" is just to consume the event so that no dmesg output is printed. Since these docks have no bays, there isn't much to do on these events anyway. ok jcs@
2013-10-19Support the hibernate key (Fn-F12)Theo de Raadt
2013-08-21Add an indicator sensor to acpibtnX reflecting lid status when available,Landry Breuil
useful for people not using machdep.lidsuspend. sysutils/upower will make use of this soon. Note that on some laptops, no LID event is triggered upon resume when using machdep.lidsuspend, so the value might be false in this case.. Tested by rpe@ on a variety of Lenovo HW, thanks! ok kettenis@ deraadt@
2013-07-03fix: cast void * to char *, fix format args for (u)int64_t,Stefan Fritsch
tc_frequency is unsigned ok kettenis@
2013-07-02If after processing an SCI event the SCI_EVT is no longer sent, we're doneMark Kettenis
and shouldn't do another SCI query. Such a spurious SCI query blocks on certain HP laptops, which in turn blocks the acpi thread. tested by many ok mlarkin@
2013-06-20Drop 3rd and 4th clauses from the BSD licence, from the following NetBSD'sMartin Pieuchot
revision: sys/dev/acpi/asus_acpi.c r1.4 sys/dev/cardbus/cardbus_exrom.c r1.11 sys/dev/cardbus/cardbus_exrom.h r1.6 ok kettenis@
2013-06-02support aml_store to a method object to override itjoshua stein
resolves a problem parsing the AML on an ASUS UX21A originally from armani@ ok kettenis@
2013-06-02The AML on the Lanner FW-8758 does a Store() to a named object that's neverMark Kettenis
actually defined. The ACPI standard isn't clear wether this is allowed, but it makes some sense to just initialize the object with the source of the Store(). Fixes the resulting panic on that particular machine. ok mlarkin@
2013-06-01Stop printing ACPI wakeup devices in dmesg after the 16th wakeup device.Mike Larkin
Helps with VMware VMs that report hundreds of wakeup devices. ok reyk@, deraadt@
2013-05-31Fix the build for a kernel without wd and pciide in its config.Alexander Bluhm
OK deraadt@ tedu@
2013-05-30Enforce ca_activate tree-walks over the entire heirarchy for all events,Theo de Raadt
cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
2013-05-23Properly implement access to IndexField() field units. The origional codeMark Kettenis
only worked for field units that were 8 bits or less in size on fields using byte access. Fixes issues origionally reported by jcs@ and armani@. ok mlarkin@
2013-04-18pin the acpi thread to the BSP, because AML and SMI cannot be trusted. ITheo de Raadt
was certain we were doing this already, but it turns out no...
2013-04-10Fix various glitches in queue macro usage.Philip Guenther
ok millert@
2013-04-02recognize and ignore power change event from newer thinkpadsjoshua stein
group and sort ignored events ok deraadt
2013-03-22Newer Thinkpads (x220, x230, t430) send a 0x6050 event whenever the brightnessMark Kettenis
keys are used. Simply ignore this event. We have no use for it and the keys work just fine with the new inteldrm(4). ok mpi@, jsg@, otto@, jsg@
2013-02-09Add explicit __attribute__ ((__format__(__kprintf__)))) to the functions andMiod Vallat
function pointer arguments which are {used as,} wrappers around the kernel printf function. No functional change.
2013-01-18acpi: add acpiec_lock and acpi_unlock routines.Paul Irofti
The routines check if the AML requires us to acquire the global lock by checking a flag stored in the soft state at attach and locks or unlocks if true. This is just building locking framework and is not hooked in any way to the kernel. Okay kettenis@.
2013-01-18acpi: Add global lock enter and leave routines.Paul Irofti
I think this diff is the way to go if we want to have proper locking in our acpi drivers. This doesn't hook onto anything from the kernel and is just building framework towards locking. Okay mlarkin@, kettenis@.
2012-12-24In acpiioctl(), Return though the splx() path if suser() returns an errorPhilip Guenthe
ok deraadt@
2012-11-27Add acpi_{acquire,release}_glk locking functions.Paul Irofti
These functions represent the basic blocks for using the ACPI global lock that provides mutual exclusion between the OSPM and the BIOS. No functional change. Okay kettenis@, deraadt@.
2012-10-31don't show Kelvin units, and don't be off by a factor of 10 either.Theo de Raadt
ok kettenis
2012-10-08Revamp the sequences for suspend/hibernate -> resume so that the codeTheo de Raadt
paths are reflexive. It is now possible to fail part-way through a suspend sequence, and recover along the resume code path. Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used after hibernate (and suspend too) to finish the job. Some drivers must be converted at the same time to use this instead of shutdown hooks (the others will follow at a later time) ok kettenis mlarkin
2012-10-04Use information provided by ACPI to attach secondary PCI host bridges.Christian Ehrhardt
ok kettenis@
2012-09-07Add a new function called acpi_pci_min_powerstate() that returns the lowestMark Kettenis
power state for a PCI device for the power state (currently S3 or S4) we're transitioning into. This function is probably too simplistic; there is a lot of (silly) complexity in the ACPI spec. ok deraadt@
2012-08-16we are past the point where timecounters may disappearTed Unangst
ok miod