History log of /openbsd-current/sys/dev/acpi/acpidev.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.44 29-Jun-2018 kettenis

Use <stdint.h> types.

ok mpi@, jung@, krw@, deraadt@


Revision tags: OPENBSD_6_3_BASE
# 1.43 17-Jan-2018 bentley

Disable ACPI burst mode on the 2015 Chromebook Pixel, where it freezes.

Diff from jcs@, ok pirofti@


Revision tags: OPENBSD_6_2_BASE
# 1.42 06-Sep-2017 jcs

fix comment


# 1.41 22-Jul-2017 jcs

acpibat: look for _BIX first before falling back on _BIF

ACPI 4.0 deprecated _BIF for battery status so some newer machines
are exporting _BIX which extends _BIF's package with a few extra
fields. When using _BIX, export the new discharge cycle count as a
sensor.

feedback from kettenis and anton
ok deraadt


Revision tags: OPENBSD_6_1_BASE
# 1.40 22-Feb-2017 jcs

add acpisbs, an acpi smart battery subsystem driver reading data
over smbus

currently disabled because it conflicts with acpibat

ok deraadt, kettenis


# 1.39 25-Oct-2016 pirofti

Deduplicate the CRS parsing code and handle broken ACPI implementations.

This change was prompted by a report from Ilya Kaliman where acpiec(4)
failed to initialize on his Acer Aspire S7.

Further investigations showed that the machine had 4 instead of 2 resources
defined inside the EC device which is a violation of all existing ACPI
revisions.


We now handle such machines by using the aml resource parser directly, which
lead to the removal of the existing one from acpiec.c, and ignoring extra
resources (although they are reported in the dmesg).

In the process I also done a couple of more style(9) fixes.


Suggested by and ok guenther@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.38 12-Aug-2015 mlarkin

Check proper HPET period value during attach.

Pointed out by patrick keshishian <pkeshish at gmail.com>, thanks.


Revision tags: OPENBSD_5_8_BASE
# 1.37 04-Aug-2015 mlarkin

Fix a handful of incorrect register offsets in acpihpet.

from patrick keshishian <pkeshish at gmail.com>

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.36 23-Nov-2014 mlarkin

If a machine has no _LIDs, then none can be open. This diff fixes a problem
where machines without any _LIDs were going back to sleep after hibernate
due to the recent suspend-if-lid-closed-on-resume diff. Noticed on qemu,
which doesn't have any _LIDs.

discussed with deraadt


# 1.35 08-Nov-2014 mlarkin

If resuming from sleep (zzz/ZZZ) and the lid is still closed, go back to
sleep. This prevents accidental lid flex or slight opening in a backpack
from waking the machine up and leaving it resumed (powered on).

ok deraadt@


Revision tags: OPENBSD_5_6_BASE
# 1.34 23-May-2014 landry

Expose bif_capacity as the 'design capacity' through an acpibat sensor,
giving you the original capacity of the battery:

hw.sensors.acpibat0.watthour0=64.07 Wh (last full capacity)
hw.sensors.acpibat0.watthour4=84.24 Wh (design capacity)

hw.sensors.acpibat0.amphour0=2.03 Ah (last full capacity)
hw.sensors.acpibat0.amphour4=4.40 Ah (design capacity)

Diff from Fabian Raetz on tech@, thanks!

ok mlarkin@ zhuk@ armani@ kettenis@


Revision tags: OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.33 13-Jul-2012 pirofti

Make the ACPI EC aware of the AML global lock.

Comments from kettenis@ and matthew@.

Okay deraadt@, kettenis@.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.32 06-Aug-2010 marco

Always call _PSW on _LID devices that support it to enable lid open to
resume the machine. Conversely disable it when the machine wakes up.

Tested by several ok deraadt


# 1.31 03-Aug-2010 marco

Add busy flag so that we don't act on a SCI until a command in progress
completes. Written with jordan.

ok deraadt


# 1.30 27-Jul-2010 jordan

Add additional Notify handler for dock devices, according to ACPI spec
ok marco


# 1.29 26-Jul-2010 jordan

Remove unused structure members


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 02-Jun-2009 jordan

Added changes for docking station, must eject all children devices
ok marco@, mlarkin@


# 1.27 10-Mar-2009 jordan

Added sensor devices for Thinkpad (temp+fan)
Exported aml_evalinteger method
ok marco@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.26 12-Nov-2007 deraadt

spacing


Revision tags: OPENBSD_4_2_BASE
# 1.25 31-May-2007 gwk

Make powernow-k8 on amd64 and i386 use the _PSS object from acpi to
retreive p_state data as spelled out in the amd64 bios and kernel
developers guide. This code is still a little rough around the edges but
has been tested by myself on a tyan machine and by phessler at theapt
dot org on an HP DL145. This diff also takes a first stab and cleaning up
the acpicpu dmesg spam.

ok tedu, marco


# 1.24 23-Apr-2007 mk

In acpidock_softc, change sc_sens from being a one element long array to
simply being a single struct ksensor.


# 1.23 22-Apr-2007 mk

Whitespace cleanup.


# 1.22 22-Apr-2007 mk

Add a TAILQ, aml_nodelist, of devices depending on the dock device to
struct acpidock_softc and stuff devices into it during attach.

This list is not yet used, but I have code ready to handle the ACPI side
of this. However, it still doesn't handle that there may in fact be
multiple dock devices in a machine (e.g. on pre-60 series ThinkPads), but
I need to figure out how to do so properly first. In the mean time I want
this in the tree so I don't lose the code.


# 1.21 22-Mar-2007 deraadt

split userland & kernel struct sensor/sensordev so that the addition
of new fields in the future is less disruptive. This is done similar
to how struct proc is handled for ps(1). ok jmc (man page changes)
tested fkr simon, and more suggestions from millert


Revision tags: OPENBSD_4_1_BASE
# 1.20 27-Jan-2007 marco

Add some more _STA flags.


# 1.19 26-Jan-2007 mk

Actually add the acpidock indicator sensor stuff to the softc struct so
acpidock compiles. I had this in my tree and forgot to commit with the
acpidock.c change yesterday. :(

Reported by Johan Mson Lindman.


# 1.18 25-Jan-2007 mk

Remove comment that I committed by accident.


# 1.17 22-Jan-2007 mk

Add driver for ACPI docking stations.

Not completely functional yet, e.g. undocking doesn't work yet but put
it in the tree to be able to safely work on this.

ok marco


# 1.16 18-Jan-2007 kettenis

Check whether PCI interrupt link devices are enabled.
Based on a diff from marco@.


# 1.15 03-Jan-2007 marco

Oops forgot this bit as part of the cleanup for acpiac. From Constantine
Murinen.


# 1.14 26-Dec-2006 marco

Add polling to devices that require it such as acpibat and acpitz.
Use the same tsleep/wakeup mechanism as the interrupt code to keep it non-
concurrent.


# 1.13 23-Dec-2006 deraadt

adapt to new two-level sensor api; Constantine A. Murenin


# 1.12 21-Dec-2006 deraadt

more minor knf


# 1.11 29-Nov-2006 marco

After a long debate at the hackathon it was decided that the acpi implementation
is not concurrent if the sensors thread goes away. This makes acpi completly
lockless.

help and ok dlg


# 1.10 19-Oct-2006 marco

Replace ACPI ioctls with APM ioctls. This makes ACPI talk the same protocol
as APM therefore userspace can now retrieve power information in the same
fashion as all other apm arches (zaurus, macppc, i386 etc).

To use force the use of acpi device like so: apmd -f /dev/acpi

ok jordan@


# 1.9 12-Oct-2006 jordan

Massive ACPI changes
Fixed ACPI leaks
new ACPI API
ok marco@


Revision tags: OPENBSD_4_0_BASE
# 1.8 04-Mar-2006 marco

Add the gasio magic to slow/speed cpu.


Revision tags: OPENBSD_3_9_BASE
# 1.7 26-Feb-2006 marco

Add GRD and PCT structures.


# 1.6 26-Feb-2006 marco

Add _PSS.


# 1.5 17-Feb-2006 jordan

Fixed code for handling _INI
Rearranged debug statements
ok marco@


# 1.4 16-Feb-2006 marco

Print useful information during boot about the battery and power supply.

ok jordan.


# 1.3 28-Dec-2005 marco

Add 2 methods (Battery Info and Battery Status)
ok jordan@


# 1.2 16-Dec-2005 marco

Typo and use correct header file.


# 1.1 16-Dec-2005 marco

Add new unified header file for devices. Suggested deraadt@


# 1.43 17-Jan-2018 bentley

Disable ACPI burst mode on the 2015 Chromebook Pixel, where it freezes.

Diff from jcs@, ok pirofti@


Revision tags: OPENBSD_6_2_BASE
# 1.42 06-Sep-2017 jcs

fix comment


# 1.41 22-Jul-2017 jcs

acpibat: look for _BIX first before falling back on _BIF

ACPI 4.0 deprecated _BIF for battery status so some newer machines
are exporting _BIX which extends _BIF's package with a few extra
fields. When using _BIX, export the new discharge cycle count as a
sensor.

feedback from kettenis and anton
ok deraadt


Revision tags: OPENBSD_6_1_BASE
# 1.40 22-Feb-2017 jcs

add acpisbs, an acpi smart battery subsystem driver reading data
over smbus

currently disabled because it conflicts with acpibat

ok deraadt, kettenis


# 1.39 25-Oct-2016 pirofti

Deduplicate the CRS parsing code and handle broken ACPI implementations.

This change was prompted by a report from Ilya Kaliman where acpiec(4)
failed to initialize on his Acer Aspire S7.

Further investigations showed that the machine had 4 instead of 2 resources
defined inside the EC device which is a violation of all existing ACPI
revisions.


We now handle such machines by using the aml resource parser directly, which
lead to the removal of the existing one from acpiec.c, and ignoring extra
resources (although they are reported in the dmesg).

In the process I also done a couple of more style(9) fixes.


Suggested by and ok guenther@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.38 12-Aug-2015 mlarkin

Check proper HPET period value during attach.

Pointed out by patrick keshishian <pkeshish at gmail.com>, thanks.


Revision tags: OPENBSD_5_8_BASE
# 1.37 04-Aug-2015 mlarkin

Fix a handful of incorrect register offsets in acpihpet.

from patrick keshishian <pkeshish at gmail.com>

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.36 23-Nov-2014 mlarkin

If a machine has no _LIDs, then none can be open. This diff fixes a problem
where machines without any _LIDs were going back to sleep after hibernate
due to the recent suspend-if-lid-closed-on-resume diff. Noticed on qemu,
which doesn't have any _LIDs.

discussed with deraadt


# 1.35 08-Nov-2014 mlarkin

If resuming from sleep (zzz/ZZZ) and the lid is still closed, go back to
sleep. This prevents accidental lid flex or slight opening in a backpack
from waking the machine up and leaving it resumed (powered on).

ok deraadt@


Revision tags: OPENBSD_5_6_BASE
# 1.34 23-May-2014 landry

Expose bif_capacity as the 'design capacity' through an acpibat sensor,
giving you the original capacity of the battery:

hw.sensors.acpibat0.watthour0=64.07 Wh (last full capacity)
hw.sensors.acpibat0.watthour4=84.24 Wh (design capacity)

hw.sensors.acpibat0.amphour0=2.03 Ah (last full capacity)
hw.sensors.acpibat0.amphour4=4.40 Ah (design capacity)

Diff from Fabian Raetz on tech@, thanks!

ok mlarkin@ zhuk@ armani@ kettenis@


Revision tags: OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.33 13-Jul-2012 pirofti

Make the ACPI EC aware of the AML global lock.

Comments from kettenis@ and matthew@.

Okay deraadt@, kettenis@.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.32 06-Aug-2010 marco

Always call _PSW on _LID devices that support it to enable lid open to
resume the machine. Conversely disable it when the machine wakes up.

Tested by several ok deraadt


# 1.31 03-Aug-2010 marco

Add busy flag so that we don't act on a SCI until a command in progress
completes. Written with jordan.

ok deraadt


# 1.30 27-Jul-2010 jordan

Add additional Notify handler for dock devices, according to ACPI spec
ok marco


# 1.29 26-Jul-2010 jordan

Remove unused structure members


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 02-Jun-2009 jordan

Added changes for docking station, must eject all children devices
ok marco@, mlarkin@


# 1.27 10-Mar-2009 jordan

Added sensor devices for Thinkpad (temp+fan)
Exported aml_evalinteger method
ok marco@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.26 12-Nov-2007 deraadt

spacing


Revision tags: OPENBSD_4_2_BASE
# 1.25 31-May-2007 gwk

Make powernow-k8 on amd64 and i386 use the _PSS object from acpi to
retreive p_state data as spelled out in the amd64 bios and kernel
developers guide. This code is still a little rough around the edges but
has been tested by myself on a tyan machine and by phessler at theapt
dot org on an HP DL145. This diff also takes a first stab and cleaning up
the acpicpu dmesg spam.

ok tedu, marco


# 1.24 23-Apr-2007 mk

In acpidock_softc, change sc_sens from being a one element long array to
simply being a single struct ksensor.


# 1.23 22-Apr-2007 mk

Whitespace cleanup.


# 1.22 22-Apr-2007 mk

Add a TAILQ, aml_nodelist, of devices depending on the dock device to
struct acpidock_softc and stuff devices into it during attach.

This list is not yet used, but I have code ready to handle the ACPI side
of this. However, it still doesn't handle that there may in fact be
multiple dock devices in a machine (e.g. on pre-60 series ThinkPads), but
I need to figure out how to do so properly first. In the mean time I want
this in the tree so I don't lose the code.


# 1.21 22-Mar-2007 deraadt

split userland & kernel struct sensor/sensordev so that the addition
of new fields in the future is less disruptive. This is done similar
to how struct proc is handled for ps(1). ok jmc (man page changes)
tested fkr simon, and more suggestions from millert


Revision tags: OPENBSD_4_1_BASE
# 1.20 27-Jan-2007 marco

Add some more _STA flags.


# 1.19 26-Jan-2007 mk

Actually add the acpidock indicator sensor stuff to the softc struct so
acpidock compiles. I had this in my tree and forgot to commit with the
acpidock.c change yesterday. :(

Reported by Johan Mson Lindman.


# 1.18 25-Jan-2007 mk

Remove comment that I committed by accident.


# 1.17 22-Jan-2007 mk

Add driver for ACPI docking stations.

Not completely functional yet, e.g. undocking doesn't work yet but put
it in the tree to be able to safely work on this.

ok marco


# 1.16 18-Jan-2007 kettenis

Check whether PCI interrupt link devices are enabled.
Based on a diff from marco@.


# 1.15 03-Jan-2007 marco

Oops forgot this bit as part of the cleanup for acpiac. From Constantine
Murinen.


# 1.14 26-Dec-2006 marco

Add polling to devices that require it such as acpibat and acpitz.
Use the same tsleep/wakeup mechanism as the interrupt code to keep it non-
concurrent.


# 1.13 23-Dec-2006 deraadt

adapt to new two-level sensor api; Constantine A. Murenin


# 1.12 21-Dec-2006 deraadt

more minor knf


# 1.11 29-Nov-2006 marco

After a long debate at the hackathon it was decided that the acpi implementation
is not concurrent if the sensors thread goes away. This makes acpi completly
lockless.

help and ok dlg


# 1.10 19-Oct-2006 marco

Replace ACPI ioctls with APM ioctls. This makes ACPI talk the same protocol
as APM therefore userspace can now retrieve power information in the same
fashion as all other apm arches (zaurus, macppc, i386 etc).

To use force the use of acpi device like so: apmd -f /dev/acpi

ok jordan@


# 1.9 12-Oct-2006 jordan

Massive ACPI changes
Fixed ACPI leaks
new ACPI API
ok marco@


Revision tags: OPENBSD_4_0_BASE
# 1.8 04-Mar-2006 marco

Add the gasio magic to slow/speed cpu.


Revision tags: OPENBSD_3_9_BASE
# 1.7 26-Feb-2006 marco

Add GRD and PCT structures.


# 1.6 26-Feb-2006 marco

Add _PSS.


# 1.5 17-Feb-2006 jordan

Fixed code for handling _INI
Rearranged debug statements
ok marco@


# 1.4 16-Feb-2006 marco

Print useful information during boot about the battery and power supply.

ok jordan.


# 1.3 28-Dec-2005 marco

Add 2 methods (Battery Info and Battery Status)
ok jordan@


# 1.2 16-Dec-2005 marco

Typo and use correct header file.


# 1.1 16-Dec-2005 marco

Add new unified header file for devices. Suggested deraadt@