#
359076 |
|
18-Mar-2020 |
hrs |
MFC of r355574, r358095, and r358395:
Add ACPI battery subsystem man page.
Add _BIX (Battery Information Extended) object support.
ACPI Control Method Batteries have a _BIF and/or _BIX object which provide static properties of the battery. FreeBSD acpi_cmbat module supported _BIF object only, which was deprecated as of ACPI 4.0. _BIX is an extended version of _BIF defined in ACPI 4.0 or later.
As of writing, _BIX has two revisions. One is in ACPI 4.0 (rev.0) and another is in ACPI 6.0 (rev.1). It seems that hardware vendors still stick to _BIF only or _BIX rev.0 + _BIF for the maximum compatibility. Microsoft requires _BIX rev.0 for Windows machines, so there are some laptop machines with _BIX rev.0 only. In this case, FreeBSD does not recognize the battery information.
After this change, the acpi_cmbat module gets battery information from _BIX or _BIF object and internally uses _BIX rev.1 data structure as the primary information store in the kernel. ACPIIO_BATT_GET_BI[FX] returns an acpi_bi[fx] structure built by using information obtained from a _BIF or a _BIX object found on the system. The revision number field can be used to check which field is available. The acpiconf(8) utility will show additional information if _BIX is available.
Although ABIs of ACPIIO_BATT_* were changed, the existing APIs for userland utilities are not changed and the backward-compatible ABIs are provided. This means that older versions of acpiconf(8) can also work with the new kernel. The (union acpi_battery_ioctl_arg) was padded to 256 byte long to avoid another ABI change in the future. A _BIX object with its revision number >1 will be treated as compatible with the rev.1 _BIX format.
Add workaround for models which do not follow the ACPI specification strictly. Extra objects are now simply ignored instead of rejecting everything.
Differential Revision: https://reviews.freebsd.org/D22556 Differential Revision: https://reviews.freebsd.org/D23728
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
263954 |
|
30-Mar-2014 |
imp |
Remove instances of variables that were set, but never used. gcc 4.9 warns about these by default.
|
#
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 |
|
22-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>
|