History log of /freebsd-10.0-release/usr.sbin/acpi/acpiconf/acpiconf.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

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

# 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


# 211763 24-Aug-2010 mav

When ACPI reports current battery consumption rate in mAmps, print it also
in mWatts. Values in mAmps are not always suitable, because they depend on
battery voltage, which depends on battery type and charge level.


# 193531 05-Jun-2009 jkim

Import ACPICA 20090521.


# 170976 21-Jun-2007 njl

Update the suspend/resume user API while maintaining backwards compat.

Improvements:
* /etc/rc.suspend,rc.resume are always run, no matter the source of the
suspend request (user or kernel, apm or acpi)
* suspend now requires positive user acknowledgement. If a user program
wants to cancel the suspend, they can. If one of the user programs
hangs or doesn't respond within 10 seconds, the system suspends anyway.
* /dev/apm is clonable, allowing multiple listeners for suspend events.
In the future, xorg-server can use this to be informed about suspend
even if there are other listeners (i.e. apmd).

Changes:
* Two new ACPI ioctls: REQSLPSTATE and ACKSLPSTATE. Request begins the
process of suspending by notifying all listeners. acpi is monitored by
devd(8) and /dev/apm listener(s) are also counted. Users register their
approval or disapproval via Ack. If anyone disapproves, suspend is vetoed.
* Old user programs or kernel modules that used SETSLPSTATE continue to
work. A message is printed once that this interface is deprecated.
* acpiconf gains the -k flag to ack the suspend request. This flag is
undocumented on purpose since it's only used by /etc/rc.suspend. It is
not intended to be a permanent change and will be removed once a better
power API is implemented.
* S5 (power off) is no longer supported via acpiconf -s 5 or apm -z/-Z.
This restores previous behavior of halt/shutdown -p being the interface.
* Miscellaneous improvements to error reporting

Approved by: re


# 148493 28-Jul-2005 njl

Correct column alignment.


# 148491 28-Jul-2005 njl

Fix nits in reporting battery information and add battery status reporting.
Rate units are mA/mW, not mAh/mWh. Get full battery status and time
remaining from ACPIIO_BATT_GET_BATTINFO instead of BST.

PR: bin/83672
MFC after: 2 days


# 148310 22-Jul-2005 njl

Use the current BST/BIF ioctls, not the deprecated ones.

MFC after: 2 days


# 138049 24-Nov-2004 imp

o Report charge/discharge rate and remaining capacity in the proper
units (as specified in _BIF). (noted by Bruno Ducrot)
o In looking in the standard, if the cap numbers are 0xffffffff, then acpi
is reporting unknown for that field. Report unknown numbers properly.
o Update the state to reflect charging, discharging and critical.


# 138047 24-Nov-2004 imp

phk jumped the gun and posted what looks like a preliminary version of
my patches for this information. Commit my more complete version.
This version isn't complete yet, since some details aren't handled
right just yet.

Poaching by: phk


# 138044 24-Nov-2004 phk

Dump current status of battery as well.

The -i code doesn't really belong here in the first place I would think,
but keep it together for now.


# 137763 16-Nov-2004 imp

Minor style(9) before possible larger commits.


# 137666 13-Nov-2004 philip

Somehow I missed this last night, acpi_init() doesn't return an int.

Spotted by: Randy Bush <randy@psg.com>


# 137638 12-Nov-2004 philip

With the addition of a proper prototype, this is now WARNS=6 clean.


# 133933 18-Aug-2004 njl

Remove the ACPIIO_ENABLE and ACPIIO_DISABLE ioctls as well as all
callers. These ioctls attempted to enable and disable the ACPI
interpreter at runtime. In practice, it is not possible to boot with
ACPI and then disable it on many systems and trying to do so can cause
crashes, interrupt storms, etc. Binary compatibility with userland is
retained.

MFC after: 2 days


# 133788 15-Aug-2004 njl

Comment out the ability to enable/disable ACPI at runtime. This appears
to not work reliably and crash some systems. It is not supported at all
on others. Pending discussion, the underlying ioctls will be removed.


# 126625 05-Mar-2004 takawata

Fix style breakage.

Noticed by: njl


# 126609 04-Mar-2004 takawata

Make unprivilaged user can see battery info.


# 124001 30-Dec-2003 njl

Add support for /etc/rc.suspend and /etc/rc.resume for ACPI. They are
called directly from acpiconf(8). Change both scripts to take a
subsystem (apm|acpi) and sleep level (suspend,standby|1-5) argument.


# 120036 13-Sep-2003 njl

Add the -i flag to acpiconf(8) to retrieve battery information.
Rename a few structure elements.


# 118127 28-Jul-2003 njl

Allow sleep states to be specified as S1, S2, ...
This is used by zzz(8).


# 114246 29-Apr-2003 njl

Support functions for the new ACPI import.
* AcpiOsDerivePciId(): finds a bus number, given the slot/func and the
acpi parse tree.
* AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to
override the value for _OS.

Ideas from: takawata, jhb
Reviewed by: takawata, marcel
Tested on: i386, ia64


# 99682 09-Jul-2002 iwasaki

Resolve conflicts arising from the ACPI CA 20020611 import.


# 87121 30-Nov-2001 cjc

Make the error messaging more helpful.

PR: 31483
Approved by: iwasaki, ru
MFC after: 4 days


# 80109 21-Jul-2001 msmith

ACPI CA doesn't recognis S4BIOS as a seperate sleep type anymore, so
drop support for it here until we work out a better way of handling it.


# 77633 02-Jun-2001 obrien

Remove double //'s in path.


# 77449 29-May-2001 msmith

Catch up to new include paths.

Submitted by: walt <wsheets@att.net>


# 68475 08-Nov-2000 iwasaki

Remove dependence on old acpi driver from acpi userland tools.

- acpiconf Replace include files from old acpi driver to acpica driver.
New sleep type `4b' had been added (S4BIOS) for `-s' option.
Of course this has no effect because driver doesn't
support it for now :-)

- acpidump All needed structs in sys/dev/acpi/*.h had been merged
into local header file. No changes on its usage.


# 66490 30-Sep-2000 msmith

Update include paths for new header locations.

Submitted by: iwasaki


# 65284 31-Aug-2000 iwasaki

This commit was generated by cvs2svn to compensate for changes in r65283,
which included commits to RCS files with non-trunk default branches.


# 65283 31-Aug-2000 iwasaki

import acpiconf(8) from ACPI For FreeBSD project.

Obtained from: ACPI For FreeBSD project