27.10.2015 Views

Advanced Configuration and Power Interface Specification

ACPI_6.0

ACPI_6.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ACPI Software Programming Model<br />

5.6.5.3 The Event (_EVT) Method for H<strong>and</strong>ling GPIO-signaled Events<br />

GPIO Interrupt Connection Descriptors assign GPIO pins a controller-relative, 0-based pin number.<br />

GPIO Pin numbers can be as large as 65, 535. GPIO Interrupt Connections that are assigned by the<br />

platform to signal ACPI events are listed in the _AEI object under the GPIO controller. Since the<br />

GPIO interrupt connection descriptor also provides the mode of the interrupt associated with an<br />

event, it gives OSPM all the information it needs to invoke a h<strong>and</strong>ler method for the event. No<br />

naming convention is required to encode the mode <strong>and</strong> pin number of the event. Instead, a h<strong>and</strong>ler<br />

for a GPIO-signaled event simply needs to have a well-known name <strong>and</strong> take the pin number of the<br />

event as a parameter. A single instance of the method h<strong>and</strong>les all ACPI events for a given GPIO<br />

controller device.<br />

For GPIO-signaled events, the Event (_EVT) method is used.<br />

_EVT is defined as follows:<br />

Arguments: (1)<br />

Arg0 - EventNumber. An Integer indicating the event number (Controller-relative zero-based GPIO<br />

pin number) of the current event. Must be in the range 0x0000 - 0xffff.<br />

Return Value:<br />

None<br />

Description<br />

The _EVT method h<strong>and</strong>les a GPIO-signaled event. It must appear within the scope of the GPIO<br />

controller device whose pins are used to signal the event.<br />

OSPM h<strong>and</strong>les GPIO-signaled events as follows:<br />

• The GPIO interrupt is h<strong>and</strong>led by OSPM because it is listed in the _AEI object under a GPIO<br />

controller.<br />

• When the event fires, OSPM h<strong>and</strong>les the interrupt according to its mode <strong>and</strong> invokes the _EVT<br />

method, passing it the pin number of the event.<br />

• From this point on, h<strong>and</strong>ling is exactly like that for GPEs. The _EVT method does a Notify() on<br />

the appropriate device, <strong>and</strong> OS-specific mechanisms are used to notify the driver of the event.<br />

Version 6.0 249

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!