History log of /freebsd-10-stable/sys/dev/acpica/acpi_button.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 246128 30-Jan-2013 sbz

Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays

Reviewed by: cognet
Approved by: cognet


# 216471 15-Dec-2010 jkim

Merge ACPICA 20101209.


# 209746 06-Jul-2010 jkim

Merge ACPICA 20100702.


# 206117 02-Apr-2010 jkim

Merge ACPICA 20100331 (and four additional upstream patches).


# 193530 05-Jun-2009 jkim

Import ACPICA 20090521.


# 167814 22-Mar-2007 jkim

Catch up with ACPI-CA 20070320 import.


# 150003 11-Sep-2005 obrien

Canonize the include of acpi.h.


# 143002 02-Mar-2005 obrien

Fix SCM ID's.


# 131341 30-Jun-2004 njl

Move flags into a private ivar so it can't collide with device flags.
Unify the code to disable GPEs with the enable code. Shutdown is handled
the same way. ACPI now does all wake/sleep prep for child devices so
now they no longer need to call external functions in the suspend/resume
path. Add the flags to non-ACPI busses (i.e., pci).


# 131282 29-Jun-2004 njl

Use the acpi_id_probe() method instead of acpi_MatchHid(), which is now
static.


# 130439 13-Jun-2004 njl

Add support to ACPI to manage its own resources. Previously, resource
allocation was passed up to nexus. Now, we probe sysresource objects and
manage the resources they describe in a local rman pool. This helps
devices which attach/detach varying resources (like the _CST object) and
module loads/unloads. The allocation/release routines now check to see if
the resource is described in a child sysresource object and if so,
allocate from the local rman. Sysresource objects add their resources to
the pool and reserve them upon boot. This means sysresources need to be
probed before other ACPI devices.

Changes include:
* Add ordering to the child device probe. The current order is: system
resource objects, embedded controllers, then everything else.
* Make acpi_MatchHid take a handle instead of a device_t arg.
* Replace acpi_{get,set}_resource with the generic equivalents.


# 129879 30-May-2004 phk

Add missing <sys/module.h> includes


# 129805 28-May-2004 njl

Update the new suspend/resume GPE methods to properly limit the GPE
based on the destination sleep state. Add a method to restore the old
state on resume. This is needed for the case of suspending to a very low
state disabling a GPE (i.e. S4), resuming, and then suspending to a higher
state (i.e. S3). This case should now keep the proper GPEs enabled.


# 129783 27-May-2004 njl

Restructure the wake GPE API. Now there are three functions:

acpi_wake_init:
Evaluate _PRW and set the GPE type
acpi_wake_set_enable:
Enable or disable a device's GPE.
acpi_wake_sleep_prep:
Perform any last-minute changes to the device to prepare it for
entering the given sleep state.

Also, walk the entire namespace when transitioning to a sleep state,
disabling any GPEs which aren't appropriate for the given state. Transition
acpi_lid and acpi_button to the new API.

This clears the way for non-ACPI-aware devices to wake the system (i.e.
modems) and fixes a problem where systems power up after shutdown when a
GPE is triggered.


# 129724 25-May-2004 njl

Enable GPE at runtime rather than suspend time. This is to match the
new behavior in ACPI-CA that defers GPE configuration. This is a temporary
measure while reworking the GPE interface.


# 129692 25-May-2004 njl

Changes to implement 20040514:

* Add calls to AcpiSetGpeType. We use wake/run as the type for lid and
button switches since wake-only causes Thinkpads to immediately wake on
the second suspend. Note that with wake/run, some systems return both
wake and device-specific notifies so we don't register for system notifies
for lid and button switches.
* Remove the hw.acpi.osi_method tunable since it is not needed.
* Always print unknown notifies for all types.
* Add more cleanup for the EC if it fails to attach.
* Use the GPE handle now that we parse it. This allows GPEs to be defined
in AML GPE blocks.
* Always use ACPI_NOT_ISR since it's ok to acquire a mutex in our thread
which processes queued requests.


# 128071 09-Apr-2004 njl

Add MODULE_DEPEND entries so some of these drivers can eventually be
loaded separately from ACPI (i.e., embedded use).


# 126014 19-Feb-2004 njl

Do not remove the fixed handlers. Several systems (e.g., ASUS) only
return events on the fixed handler even after defining a duplicate in the
AML. While this violates the spec, hopefully we can get by with leaving
both installed.


# 125986 19-Feb-2004 njl

Fix problem caused by previous commit where some users' buttons
stopped returning events. Don't disable the event when removing
the handler because it still needs to be enabled for the other
handler. Also, remove duplicate AcpiEnableEvent calls since the
install function now does this for us.


# 125679 11-Feb-2004 njl

Prefer buttons defined in the AML over the ones in the FADT. Some
systems define power/sleep buttons in both places but only deliver
notifies to the ones defined in the AML.

Also, reduce length of various function handler names.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:


# 121493 25-Oct-2003 njl

Add devctl(4) notify support to ACPI. Various subsystems now notify
userland whenever events occur. See the example in devd.conf below
to see how to use it.


# 120327 22-Sep-2003 njl

Fix the ACPI_DEBUG case.

Reported by: Larry Rosenman <ler@lerctr.org>
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:


# 120317 21-Sep-2003 phk

Make this compile.


# 120308 21-Sep-2003 njl

Add support for fixed event buttons defined in the DSDT (HID "ACPI_FSB"
and "ACPI_FPB").

Pointed out by: Linux


# 118783 11-Aug-2003 njl

Style cleanups to match the rest of this directory. For acpi_battery.c,
remove unused includes.


# 118049 26-Jul-2003 takawata

Enable wake up GPE before shutdown, not only for sleeping.


# 100497 22-Jul-2002 iwasaki

Add device(power/sleep button and lid) wake function from sleeping state.
This is required for some Thinkpad (and maybe VAIO) machines to wake
the system up from sleep.

Currently partially implemented, more complete implementation will come later.


# 97274 25-May-2002 bde

Fixed printf format errors which apparently crept in while -Wformat was
disabled for gcc-3.


# 96926 19-May-2002 peter

Brutally deal with __func__ being 'const char *' on gcc-3.1.


# 91123 23-Feb-2002 msmith

Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.


# 89054 08-Jan-2002 msmith

Staticise devclasses and some unnecessarily global variables.


# 86552 18-Nov-2001 iwasaki

Cleanups of verbose printing. All the messages for the debugging is
disabled unless verbose flag is set. Also fix some messages in terms
of English.
The critical messages and error messages in probe/attach routine are
unchanged by this commit.


# 80078 21-Jul-2001 msmith

Convert from acpi_strerror() to AcpiFormatException()

Fix dangling include of the dear departed acpi_ecreg.h


# 80067 21-Jul-2001 msmith

Don't call ourselves a "control method" anything, that's not useful.

Move the "button pressed" diagnostics to the point where we can print
out which button was actually pressed.


# 77432 29-May-2001 msmith

- Updates for new constant naming in the ACPI CA 20010518 update.
- Use __func__ instead of __FUNCTION.
- Support power-off to S3 or S5 (takawata)
- Enable ACPI debugging earlier (with a sysinit)
- Fix a deadlock in the EC code (takawata)
- Improve arithmetic and reduce the risk of spurious wakeup in
AcpiOsSleep.
- Add AcpiOsGetThreadId.
- Simplify mutex code (still disabled).


# 69744 08-Dec-2000 msmith

- Convert a lot of homebrew debugging output to use the ACPI CA debugging
infrastructure. It's not perfect, but it's a lot better than what
we've been using so far. The following rules apply to this:
o BSD component names should be capitalised
o Layer names should be taken from the non-CA set for now. We
may elect to add some new BSD-specific layers later.

- Make it possible to turn off selective debugging flags or layers
by listing them in debug.acpi.layer or debug.acpi.level prefixed
with !.

- Fully implement support for avoiding nodes in the ACPI namespace.
Nodes may be listed in the debug.acpi.avoid environment variable;
these nodes and all their children will be ignored (although still
scanned over) by ACPI functions which scan the namespace. Multiple
nodes can be specified, separated by whitespace.

- Implement support for selectively disabling ACPI subsystem components
via the debug.acpi.disable environment variable. The following
components can be disabled:
o bus creation/scanning of the ACPI 'bus'
o children attachment of children to the ACPI 'bus'
o button the acpi_button control-method button driver
o ec the acpi_ec embedded-controller driver
o isa acpi replacement of PnP BIOS for ISA device discovery
o lid the control-method lid switch driver
o pci pci root-bus discovery
o processor CPU power/speed management
o thermal system temperature detection and control
o timer ACPI timecounter
Multiple components may be disabled by specifying their name(s)
separated by whitespace.

- Add support for ioctl registration. ACPI subsystem components may
register ioctl handlers with the /dev/acpi generic ioctl handler,
allowing us to avoid the need for a multitude of /dev/acpi* control
devices, etc.


# 67761 28-Oct-2000 msmith

Initial FreeBSD OSPM (operating system power management) modules for
ACPICA. Most of these are still works in progress. Support exists for:

- Fixed feature and control method power, lid and sleep buttons.
- Detection of ISA PnP devices using ACPI namespace.
- Detection of PCI root busses using ACPI namespace.
- CPU throttling and sleep states (incomplete)
- Thermal monitoring and cooling control (incomplete)
- Interface to platform embedded controllers (mostly complete)
- ACPI timer (incomplete)
- Simple userland control of sleep states.
- Shutdown and poweroff.