AcpiGetEventStatus: interface with behavior
Andriy Gapon
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
Andriy Gapon
[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_STATUSshould be populated. I am not sure if AcpiGetEventStatus should be made compatible withACPI_EVENT_STATUSor if its out type should be changed to something else.Also, it looks that the comment near
ACPI_EVENT_STATUSdefinitions is a little bit out of sync.
Signature · 1 line
Andriy Gapon