History log of /freebsd/sys/dev/acpica/acpi_battery.c (Results 76 – 93 of 93)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 84cdcfb3 11-Aug-2005 Nate Lawson <njl@FreeBSD.org>

Modify the fix in rev 1.16 slightly. Instead of setting the cap to zero,
just skip summing it if it's unknown.

MFC after: 1 day


# 9396c1b2 05-Aug-2005 Nate Lawson <njl@FreeBSD.org>

When summing capacities, skip info from batteries that weren't present.
Previously, we used all info (including -1 or "not present") which would
keep the system from reaching 100% when charging.

Rep

When summing capacities, skip info from batteries that weren't present.
Previously, we used all info (including -1 or "not present") which would
keep the system from reaching 100% when charging.

Reported by: Eric Anderson
MFC after: 2 days

show more ...


# e4515dd5 28-Jul-2005 Nate Lawson <njl@FreeBSD.org>

Add descriptions for the sysctls.

MFC after: 1 day


# 50d0e47a 28-Jul-2005 Nate Lawson <njl@FreeBSD.org>

Zero the _BST, _BIF, and battinfo allocations. This is needed since we
later sum capacities for all batteries, even those that weren't actually
present. We only need to do this for _BST but do it f

Zero the _BST, _BIF, and battinfo allocations. This is needed since we
later sum capacities for all batteries, even those that weren't actually
present. We only need to do this for _BST but do it for all of them.

Reported by: Eric Anderson
MFC after: 1 day

show more ...


# f4e31e2e 25-Jul-2005 Nate Lawson <njl@FreeBSD.org>

Correct minor output bug. When the battery being queried is charging or
the overall discharge rate is 0, mark the battery remaining time as
"unknown", not 0.

Reported by: Eric Kjeldergaard
MFC afte

Correct minor output bug. When the battery being queried is charging or
the overall discharge rate is 0, mark the battery remaining time as
"unknown", not 0.

Reported by: Eric Kjeldergaard
MFC after: 4 days

show more ...


# 76f6fe4f 23-Jul-2005 Nate Lawson <njl@FreeBSD.org>

Rewrite the acpi_battery interface to allow for other battery types
(i.e., smart battery) and fix various bugs found during the cleanup.

API changes:
* kernel access:
Access to individual batteries

Rewrite the acpi_battery interface to allow for other battery types
(i.e., smart battery) and fix various bugs found during the cleanup.

API changes:
* kernel access:
Access to individual batteries is now via devclass_find("battery").
Introduce new methods ACPI_BATT_GET_STATUS (for _BST-formatted data) and
ACPI_BATT_GET_INFO (for _BIF-formatted data). The helper function
acpi_battery_get_battinfo() now takes a device_t instead of a unit #
argument. If dev is NULL, this signifies all batteries.

* ioctl access:
The ACPIIO_BATT_GET_TYPE and ACPIIO_BATT_GET_BATTDESC ioctls have been
removed. Since there is now no need for a mapping between "virtual" unit
and physical unit, usermode programs can just specify the unit directly and
skip the old translation steps. In fact, acpiconf(8) was actually already
doing this and virtual unit was the same as physical unit in all cases
since there was previously only one battery type (acpi_cmbat). Additionally,
we now map the ACPIIO_BATT_GET_BIF and ACPIIO_BATT_GET_BST ioctls for all
batteries, if they provide the associated methods.

* apm compatibility device/ioctls: no change
* sysctl: no change

Since most third-party applications use the apm(4) compat interface, there
should be very few affected applications (if any).

Reviewed by: bruno
MFC after: 5 days

show more ...


Revision tags: release/5.4.0_cvs, release/5.4.0
# 8f764959 17-Mar-2005 Nate Lawson <njl@FreeBSD.org>

Introduce a general name for the previously cmbat-only ioctls. It has the
same value as the previous ioctls so no binary change. Also, make a few
style changes to reduce diffs to my tree.

Loosely

Introduce a general name for the previously cmbat-only ioctls. It has the
same value as the previous ioctls so no binary change. Also, make a few
style changes to reduce diffs to my tree.

Loosely based on code from: Hans Petter Selasky

show more ...


# dad97fee 02-Mar-2005 David E. O'Brien <obrien@FreeBSD.org>

Fix SCM ID's.


Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0
# 07d4077e 13-Aug-2004 Nate Lawson <njl@FreeBSD.org>

MPSAFE locking

* Serialize acpi_battery_get_battdesc(), acpi_battery_register(), and
acpi_battery_remove().
* Assert that the sx lock is held in acpi_batteries_init().
* Remove check for device_ge

MPSAFE locking

* Serialize acpi_battery_get_battdesc(), acpi_battery_register(), and
acpi_battery_remove().
* Assert that the sx lock is held in acpi_batteries_init().
* Remove check for device_get_softc() returning NULL.

show more ...


# 7a5230b8 12-Jul-2004 Nate Lawson <njl@FreeBSD.org>

Add the ability to detach a battery. Now batteries that are detached are
also removed from the battery list.


Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0
# 798fb860 11-Aug-2003 Nate Lawson <njl@FreeBSD.org>

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


Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0
# a89fcf28 15-Feb-2003 Takanori Watanabe <takawata@FreeBSD.org>

Allow non-privilaged user to retrive battery or AC line information.

Reviewed by: rwatson


Revision tags: release/5.0.0_cvs, release/5.0.0
# fc0ea94a 16-Oct-2002 John Baldwin <jhb@FreeBSD.org>

Catch up to changes in acpivar.h to add support for using ACPI on
4-stable systems.

Sponsored by: The Weather Channel


Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs, release/4.5.0_cvs, release/4.4.0_cvs
# 3273b005 08-Jan-2002 Mike Smith <msmith@FreeBSD.org>

Staticise devclasses and some unnecessarily global variables.


# 9febbb40 30-Oct-2001 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Some improvements of control method battery driver.
- Add a new MIB for battery info expire time in order to make it changeable.
Battery info expire time can be specified by
hw.acpi.battery.in

Some improvements of control method battery driver.
- Add a new MIB for battery info expire time in order to make it changeable.
Battery info expire time can be specified by
hw.acpi.battery.info_expire in sec.
- Add own MALLOC type and fix some potential memory leakages.
- Change some frequent printings to verbose printing.
- Stop timeout during acpi_cmbat_get_bst() too. This should reduce
the races with BIF evaluation.
- Remove acpi_cmbat_get_bif() invocation from acpi_cmbat_attach().
This was redundant because this should be called from
acpi_cmbat_timeout() now.

show more ...


# f86214b6 26-Oct-2001 Mitsuru IWASAKI <iwasaki@FreeBSD.org>

Add APM compatibility feature to ACPI.
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 wit

Add APM compatibility feature to ACPI.
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

show more ...


# 4c1cdee6 27-Aug-2001 Mike Smith <msmith@FreeBSD.org>

Updates to match the ACPI CA 20010816 import:

- New debug macro (ACPI_DEBUG_PRINT), reducing debug-case code size.
- New debug level/subsystem codes.


# 6f69255b 05-Jul-2001 Mike Smith <msmith@FreeBSD.org>

Add a new helper function for finding resources in resource buffers.

Move the ACPI generic battery code into a new file.


1234