Skip to contentSkip to conversation

AcpiGetEventStatus: interface with behavior

Devel Andriy Gapon 1 participant 2 messages Dec 26, 2012 – Jan 25, 2013 ACPI component architecture (acpica)

lore
Share & tools
lore

Andriy Gapon

author
#0 lore raw

AcpiGetEventStatus has an out parameter of type ACPI_EVENT_STATUS. My impression that values of that type should conform to bit definitions provided near the type declaration (ACPI_EVENT_FLAG_ENABLED, ACPI_EVENT_FLAG_SET, etc).
But it seems that currently AcpiGetEventStatus returns only values zero and one corresponding to inactive and active status.

The linux (adaption of the) code here
http://lxr.linux.no/#linux+v3.7.1/drivers/acpi/acpica/evxfevnt.c#L313
seems to be a bit more elaborate. It actually tries to produce a value that conforms to the definitions by examining not only the status register but also enable register.

It looks like AcpiHwGetGpeStatus is the model for how ACPI_EVENT_STATUS should be populated. I am not sure if AcpiGetEventStatus should be made compatible with ACPI_EVENT_STATUS or if its out type should be changed to something else.

Also, it looks that the comment near ACPI_EVENT_STATUS definitions is a little bit out of sync.

Signature · 1 line
Andriy Gapon
author
#1 lore raw

[ping]

on 26/12/2012 10:42 Andriy Gapon said the following:

Quoted 21 lines

AcpiGetEventStatus has an out parameter of type ACPI_EVENT_STATUS. My impression that values of that type should conform to bit definitions provided near the type declaration (ACPI_EVENT_FLAG_ENABLED, ACPI_EVENT_FLAG_SET, etc).
But it seems that currently AcpiGetEventStatus returns only values zero and one corresponding to inactive and active status.

The linux (adaption of the) code here
http://lxr.linux.no/#linux+v3.7.1/drivers/acpi/acpica/evxfevnt.c#L313
seems to be a bit more elaborate. It actually tries to produce a value that conforms to the definitions by examining not only the status register but also enable register.

It looks like AcpiHwGetGpeStatus is the model for how ACPI_EVENT_STATUS should be populated. I am not sure if AcpiGetEventStatus should be made compatible with ACPI_EVENT_STATUS or if its out type should be changed to something else.

Also, it looks that the comment near ACPI_EVENT_STATUS definitions is a little bit out of sync.

Signature · 1 line
Andriy Gapon