summaryrefslogtreecommitdiff
path: root/sys/dev/acpi/acpi.c
AgeCommit message (Collapse)Author
2012-07-13Disable acpivideo(4) on ASUS laptops.Paul Irofti
There are some models that panic whenever an event is received. Some cope, some don't. In order to get this right acpiec(4) requires major rework. Until then let machines boot. Discussed with deraadt@.
2012-07-11for now, restrict hibernate to root in the acpi ioctl kernel interface.Mike Larkin
normal rules for controlling this interface through apmd still apply. ok deraadt@
2012-07-09tiny little oops in untested hibernate blockTheo de Raadt
2012-07-09clean up ioctl() case statementsTheo de Raadt
2012-07-09acpi_disable_onegpe() is not used; ok piroftiTheo de Raadt
2012-05-24If _MIN > _MAX consider a WordBus resource to be invalid. Fixes a panic onMark Kettenis
the IBM x3550-M4. ok mikeb@
2012-03-29Missing #ifdef in previous diffMike Larkin
2012-03-29Prevent hibernation attempts on machines with unsupported disk controllers.Mike Larkin
The same check is also performed later in the hibernate sequence, but by then it's too late to cleanly unwind (presently). ok deraadt
2012-03-26simplify conditionals in acpi_sleep_state()Theo de Raadt
ok mlarkin
2012-03-26hook in the hibernate request code; half of this diff is from mlarkinTheo de Raadt
ok mlarkin
2011-09-20Very early in suspend while the clock is still ticking realtime,Theo de Raadt
save the clock back to the rtc. The zaurus already did this. ok phessler miod kettenis
2011-07-02kqueue attach functions should return an errno or 0, not a plain 1. FixNicholas Marriott
the obvious cases to return EINVAL and ENXIO. ok tedu deraadt
2011-06-24machdep.kbdreset enables a shutdown by Ctrl-Alt-Del on amd64 andChristian Weisgerber
i386. Stop abusing it on other archs for controling a shutdown by pressing the soft power button: * Add a MI sysctl hw.allowpowerdown; if set to 1 (the default) it allows a power button shutdown. * Make acpi(4)/acpibtn(4) honor hw.allowpowerdown. * Switch the various power button intercepts on landisk, sgi, sparc64 and zaurus over to hw.allowpowerdown. * Garbage collect the machdep.kbdreset sysctl on all archs other than amd64 and i386. ok miod@
2011-06-16Import acpitoshiba driver.Paul Irofti
This is originally written by Hiroyuki Aizu, ported and integrated in our tree by Javier Vazquez <javama4 AT gmail> with tweaks and suggestions by me. Import prodded by deraadt@ and the lack of testers on tech@.
2011-04-27attach acpithinkpad to newer lenovo models like the x120ejoshua stein
ok deraadt@
2011-04-22Fix uninitialzied variables and formatting strings (-Wxxx errors)Jordan Hargrave
2011-01-02Re-add code for ACPI taskqueue, eliminates need for state vars in acpi softcJordan Hargrave
Serialize processing ACPI tasks for sleep/powerdown/GPE event ok deraadt@
2010-10-31Revert last commit: it breaks resume on ThinkpadsPhilip Guenthe
"then please back it out" deraadt@
2010-10-26Add task queue for ACPI gpe and notify handlersJordan Hargrave
This fixes eject on Dell Latitude dock and an issue on the Dell Mini battery update. ok deraadt
2010-10-07Create separate functions for enabling wake and runtime gpes.Jordan Hargrave
Remove old suspend/resume gpewalk function ok deraadt, mlarkin
2010-10-05split acpi_enable_onegpe to separate enable/disable functionsJordan Hargrave
ok deraadt
2010-10-05Added acpi_disable_allgpes function to clear GPE statusJordan Hargrave
ok deraadt
2010-10-05clean up acpi_softc use moreTheo de Raadt
2010-10-05delete a bit of #if 0 codeTheo de Raadt
2010-10-05hide use of our global acpi_softc pointer a bit betterTheo de Raadt
2010-09-29grab the acpi thread lock very early in acpi thread startup; not that itTheo de Raadt
is likely that anyone will race us... but why be careless. ok kettenis
2010-08-31Add DVACT_QUIECE support. This is called before splhigh() and beforeTheo de Raadt
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
2010-08-29- add a check for FWRITE here too.Jasper Lievisse Adriaanse
ok miod@
2010-08-27Make PCI Power Management optional, and only enable it when acpi(4) attaches.Mark Kettenis
ok deraadt@
2010-08-08Close race between the acpi thread and wscons ioctls running in processMark Kettenis
context. We might rip this out post-release and replace it with a solution that serializes things in a more obvious way. ok deraadt@, miod@ and "those crazy texans who ok anything"
2010-08-08Report the acpi sleep states when on a RAMDISK; ok krwTheo de Raadt
2010-08-07Enforce acpi register access rescrictions.Mark Kettenis
ok mlarkin@, deraadt@, tested by marco@
2010-08-07upon resume, notify all the acpiac and acpibat drivers to updateTheo de Raadt
their status. some laptops do not do this automatically. ok kettenis canacar
2010-08-06Always call _PSW on _LID devices that support it to enable lid open toMarco Peereboom
resume the machine. Conversely disable it when the machine wakes up. Tested by several ok deraadt
2010-08-06As part of a revamp of the PM1/GPE code, I write this diff to look forTheo de Raadt
unmanaged EN & STS bits in the PM1 register at interrupt time and report them. As a side effect this splits the STS acknowledgement into two writes (for power, and sleep) instead of one. The printf that is added (to spot unmanaged STS bits) has not yet been triggered as far as we know. Before the "write to PM1 registers at the right offset" diff went in, this was not neccessary. But newer thinkpads do not have a working soft power button without this diff. We have no idea why. ok mlarkin kettenis
2010-08-05PM1 power button events were generating 'fake events' to acpibtn PWRB,Theo de Raadt
but if there is no such device these were being tossed. Instead, arrange for all power button handlers to flag a softc variable which is processed by the thread; so that one place will know to request a powerdown (psignal to init) ok marco mlarkin
2010-08-05rename a variable which is annoyingly poorly namedTheo de Raadt
2010-08-05Write to the correct offset for various ACPI pmreg registers. Writing toMike Larkin
the correct register does properly clear the wake status bits and fixed event bits, which allows some machines to have more than 1 suspend cycle. bug spotted by deraadt@ tested by deraadt@ and myself on a half-dozen machines and others on hackers@ ok deraadt@, marco@
2010-08-05Fix the power button. The pm1 register is 16 bits in size.Theo de Raadt
My mistake, a while back. tested by krw
2010-08-04Print supported sleep states.Mark Kettenis
ok marco@, phessler@, deraadt@
2010-08-03Use the proper flag for re-enabling certain hardware events (power btn,Mike Larkin
sleep btn). The (incorrect) flag prevoiously used coincidentally had the same value, so this shouldn't cause any different behavior than before. tested on a variety of machines (i386, amd64, sp, mp) - no behavioral change seen ok deraadt@
2010-07-28Make all gasio failures look and behave the same.Marco Peereboom
2010-07-28Delay a little longer on suspend before giving up. Fixes machines thatMike Larkin
sometimes don't suspend because the sleep transition takes too long (symptoms like failing to sleep but the backlight stays on). ok deraadt@
2010-07-27remove XXX; EC can now be attached early when needed; ok jordanTheo de Raadt
2010-07-27more brackets feels goodTheo de Raadt
2010-07-27XXX annotate a block in acpi_enter_sleep_state() that is pretty worryingTheo de Raadt
2010-07-27horrific indentation that nearly made me pukeTheo de Raadt
2010-07-27Set the sleeping indicator light on machines that support it, in case SMIMike Larkin
doesn't do it for us. Shows the 'moon' LED on older Thinkpads when sleeping. Tested on T43p, W500, T510 by me and on X61s by deraadt@. ok deraadt@
2010-07-27Early initialization of acpiec if ECDT table existsJordan Hargrave
Fixes hang when booting thinkpads while docked ok deraadt
2010-07-26remove merge error which was commitedTheo de Raadt