summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_acad.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not hold the ACPI A/C adapter lock when changing the power profile.jhb2009-09-301-2/+3
| | | | MFC after: 2 weeks
* Import ACPICA 20090521.jkim2009-06-051-1/+2
|
* Catch up with ACPI-CA 20070320 import.jkim2007-03-221-2/+2
|
* Invert the check logic. No functional change, but I prefer this version.njl2005-10-241-4/+2
|
* If no AC line devices are found, go ahead and notify devd that the systemnjl2005-10-241-0/+18
| | | | | | | is on AC power (i.e. not a laptop). This allows power_profile to run once for desktop systems as well, for instance, to set C3 or CPU frequency. MFC after: 2 weeks
* Canonize the include of acpi.h.obrien2005-09-111-1/+1
|
* Standardize __FBSDID identifiers.njl2005-07-221-2/+3
| | | | MFC after: 2 days
* Use General definition for general notify.takawata2005-05-191-4/+2
|
* Catch up with AcpiOsSleep() interface change.marks2004-12-021-1/+1
| | | | | | | | Catch up with some #define's renaming. Implement AcpiOsGetTimer() as per ACPI 3.0. Approved by: njl MFC after: 1 week
* Record the new status after checking if it has changed, not before. Thisnjl2004-08-131-1/+1
| | | | | | fixes lost AC line transition events. Bug report: Kevin Oberman
* MPSAFE lockingnjl2004-08-131-30/+16
| | | | | | | * Serialize notification of acline changes in acpi_acad_get_status(). * Remove the initializing flag. With the locking, we don't need to push off requests for the acline before initialization is done. * Don't check device_get_softc(), it can't return NULL.
* Use ACPI_ALL_NOTIFY instead of registering handlers separately.njl2004-07-161-5/+3
|
* Use the acpi_id_probe() method instead of acpi_MatchHid(), which is nownjl2004-06-291-6/+10
| | | | static.
* Add support to ACPI to manage its own resources. Previously, resourcenjl2004-06-131-1/+1
| | | | | | | | | | | | | | | | | 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.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Changes to implement 20040514:njl2004-05-251-4/+3
| | | | | | | | | | | | | | | * 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.
* Make unnecessary globals static and remove unused includes.njl2004-05-061-1/+0
| | | | Pointed out by: cscout
* Allow the AC adapter device to be disabled with debug.acpi.disable="acad".njl2004-04-201-2/+1
| | | | | | Even though documented, this option was never enabled even in rev 1.1. Submitted by: sos
* Add MODULE_DEPEND entries so some of these drivers can eventually benjl2004-04-091-0/+1
| | | | loaded separately from ACPI (i.e., embedded use).
* Change to acpi_{Get,Set}Integer to provide both methods. Convert allnjl2004-03-031-1/+1
| | | | | | callers to the new API. Submitted by: Mark Santcroos <marks@ripe.net>
* Add devctl(4) notify support to ACPI. Various subsystems now notifynjl2003-10-251-1/+3
| | | | | userland whenever events occur. See the example in devd.conf below to see how to use it.
* Consistently print attach messages.njl2003-09-261-1/+1
|
* Print notify values as hex.njl2003-09-141-1/+1
|
* Revert part of rev. 1.16 -- reinstate system notify handler. It turns outnjl2003-08-151-0/+6
| | | | | | at least the Casio FIVA requires this. Requested by: takawata
* Don't install a system notify handler. Move the device notify handlernjl2003-08-151-12/+11
| | | | | installation to just before we're ready to handle events. Make a loop more readable (no functional change).
* Style cleanups to match the rest of this directory. For acpi_battery.c,njl2003-08-111-166/+156
| | | | remove unused includes.
* Allow non-privilaged user to retrive battery or AC line information.takawata2003-02-151-0/+5
| | | | Reviewed by: rwatson
* Add status initialization code for acpi_cmbat and acpi_acad,iwasaki2002-11-031-1/+37
| | | | | | | | acpi_cmbat_init_battery() and acpi_cmbat_init_acline() respectively. Call acpi_cmbat_init_battery() from acpi_cmbat_resume() too just in case. This is a workaround for embedded controller operations which is unstable for about a minute (typically 30 or 40 sec.) at boot time.
* Add generalized power profile code.iwasaki2002-03-041-1/+2
| | | | | | | | | | | | | This makes other power-management system (APM for now) to be able to generate power profile change events (ie. AC-line status changes), and other kernel components, not only the ACPI components, can be notified the events. - move subroutines in acpi_powerprofile.c (removed) to kern/subr_power.c - call power_profile_set_state() also from APM driver when AC-line status changes - add call-back function for Crusoe LongRun controlling on power profile changes for a example
* Match namespace cleanup changes in ACPI CA 20020217 update.msmith2002-02-231-2/+2
| | | | Use ACPI_SUCCESS/ACPI_FAILURE consistently.
* Cleanups of verbose printing. All the messages for the debugging isiwasaki2001-11-181-7/+4
| | | | | | | 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.
* Add APM compatibility feature to ACPI.iwasaki2001-10-261-4/+23
| | | | | | | | | | | | | | | | | This emulates APM device node interface APIs (mainly ioctl) and provides APM services for the applications. The goal is to support most of APM applications without any changes. Implemented ioctls in this commit are: - APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl) - APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl) - APMIO_GETINFO and APMIO_GETINFO_OLD - APMIO_GETPWSTATUS With above, many APM applications which get batteries, ac-line info. and transition the system into suspend/standby mode (such as wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-) Reviewed by: arch@, audit@ and some guys
* Initialise the adapter status to an invalid state, so that the initial checkmsmith2001-09-061-0/+1
| | | | | | | | | of the adapter object will always result in a change event. This fixes the problem where a laptop booted without an AC adapter ran at 100% CPU speed by default. Submitted by: "Christopher N . Harrell" <cnh@netvmg.com>
* Some minor fixes.iwasaki2001-07-251-4/+11
| | | | | | | - Set system power profile only when AC-line status has canged. - Get initial AC-line status after whole system is up. Reviewed by: msmith
* Add support for system power profiles; select "performance" when AC powermsmith2001-07-071-0/+3
| | | | is available and "economy" when it is not.
* Add sysctl interface (Read-only) for temprature, AC-line and Battery.iwasaki2001-06-231-11/+54
| | | | Patches for acpi_cmbat.c submitted by Munehiro Matsuda.
* - Updates for new constant naming in the ACPI CA 20010518 update.msmith2001-05-291-0/+5
| | | | | | | | | | | - 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).
* ACPI_NUMBER becomes ACPI_INTEGER. acpi_EvaluateNumber becomesmsmith2001-01-311-1/+1
| | | | | | | | | | | acpi_EvaluateInteger. Use acpi_EvaluateInteger instead of doing things the hard way where possible. AcpiSetSystemSleepState (unofficial) becomes AcpiEnterSleepState. Use the AcpiGbl_FADT pointer rather than searching for the FADT.
* Add ioctls to acpi_cmbat and acpi_acad. These use mike's acpi_register_ioctl().iwasaki2000-12-241-0/+27
| | | | Fix wrong AML method calling in acpi_cmbat.
* Add ACPI AC adaptor and ACPI Control Method Battery.takawata2000-12-221-0/+138
And install notify handler for thermal zone .
OpenPOWER on IntegriCloud