History log of /freebsd-10.3-release/sys/dev/acpica/acpi_smbat.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 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


# 235556 17-May-2012 jhb

Centralize declaration of the debug.acpi sysctl node.


# 227309 07-Nov-2011 ed

Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.

The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.


# 216503 17-Dec-2010 avg

small cleanup of acpi battery status setting and checking

This is based on the patch submitted by Yuri Skripachov.
Overview of the changes:
- clarify double-use of some ACPI_BATT_STAT_* definitions
- clean up undefined/extended status bits returned by _BST
- warn about charging+discharging bits being set at the same time

PR: kern/124744
Submitted by: Yuri Skripachov <y.skripachov@gmail.com>
Tested by: Yuri Skripachov <y.skripachov@gmail.com>
MFC after: 2 weeks


# 202771 21-Jan-2010 jkim

Merge ACPICA 20100121.


# 193530 05-Jun-2009 jkim

Import ACPICA 20090521.


# 186031 13-Dec-2008 silby

Quick change to r186026. One of the conditionals was:

if (batt_sleep_ms)
AcpiOsSleep(1);

where the rest are all:

if (batt_sleep_ms)
AcpiOsSleep(batt_sleep_ms);

I can't recall why that one was different, so change it
to match the rest.

Pointed out by: Christoph Mallon
MFC after: 2 weeks


# 186026 13-Dec-2008 silby

Add the sysctl debug.acpi.batt.batt_sleep_ms.

On some laptops with smart batteries, enabling battery monitoring
software causes keystrokes from atkbd to be lost. This has also been
reported on Linux, and is apparently due to the keyboard and I2C line
for the battery being routed through the same chip. Whether that's
accurate or not, adding extra sleeps to the status checking code
causes the problem to go away.

I've been running this for nearly six months now on my laptop,
it works like a charm.

Reviewed by: Nate Lawson (in a previous revision)
MFC after: 2 weeks


# 155869 21-Feb-2006 njl

Remove unused variable.

Coverity ID: 548
Found by: Coverity Prevent


# 154273 12-Jan-2006 bruno

* fix bst.status. We mark some bits, but forgot to reset all of them
before. The symptom is that the battery inform us its charge and discharge
at the same time...

* fix bst.rate to correctly output the (dis)charging rate. We'll use
the current average over one minute command and not the at_rate command.
Note that this method is not correct if the capacity_mode is set, but
since we don't set it ourself, it is not a problem.

The at_rate do not give the actual rate but is used to compute the
estimated time for (dis)charging a battery. We should actually
write an estimation of the actual rate using at_rate cmd and then
perform a read to the various estimators.

Approved by: njl
MFC after: 2 days


# 152744 24-Nov-2005 njl

Only copy out the battery status/info if there was no error.


# 152677 22-Nov-2005 ume

Cache the result of battery info retrieval from smbat as well
as cmbat.

Reviewed by: njl
MFC after: 3 days


# 151564 23-Oct-2005 njl

Import ACPI smart battery support. Newer systems (Acer, mostly) do not
support the CM-battery interface. Smart batteries can eventually be
supported without ACPI via a separate SMBus interface. The ACPI interface
uses the embedded controller for reading/writing to the SMBus, and normal
ASL definitions for locating the battery controller (since SMBus can't be
enumerated.) Also import definitions for the smart battery interface.

This was written by Hans Petter Selasky with minor cleanups from myself.

Submitted by: Hans Petter Selasky <hselasky / c2i.net>