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.

<strong>Advanced</strong> <strong>Configuration</strong> <strong>and</strong> <strong>Power</strong> <strong>Interface</strong> <strong>Specification</strong><br />

5.6.5 GPIO-signaled ACPI Events<br />

On Hardware-reduced ACPI platforms, ACPI events are signaled when a GPIO Interrupt is received<br />

by OSPM, <strong>and</strong> that GPIO Interrupt Connection is listed in a GPIO controller device’s _AEI object.<br />

OSPM claims all such GPIO interrupts, <strong>and</strong> maps them to the appropriate event method required by<br />

the ACPI event model.<br />

5.6.5.1 Declaring GPIO Controller Devices<br />

A GPIO controller is modeled as a device in the namespace, with _HID or _ADR <strong>and</strong> _CRS objects,<br />

at a minimum. Optionally, the GPIO controller device scope may include GeneralPurposeIO<br />

OpRegion declarations ( Section 5.5.2.4.4) <strong>and</strong> GPIO interrupt-to-ACPI Event mappings<br />

(Section 5.6.5.2). Note that for GPIO-signaled ACPI events, the corresponding event method (e.g.<br />

_Exx, _Lxx, or _EVT) must also appear in the target GPIO controller’s scope. For GPIO event<br />

numbers larger than 255 (0xFF), the _EVT method is used.<br />

Each pin on a GPIO Controller has a configuration (e.g. level-sensitive interrupt, de-bounced input,<br />

high-drive output, etc.), which is described to OSPM in the GPIO Interrupt or GPIO IO Connection<br />

resources claimed by peripheral devices or used in operation region accesses.<br />

5.6.5.2 _AEI Object<br />

The _AEI object designates those GPIO interrupts that shall be h<strong>and</strong>led by OSPM as ACPI events<br />

(See Section 5.6.5). This object appears within the scope of the GPIO controller device whose pins<br />

are to be used as GPIO-signaled events.<br />

Arguments:<br />

None<br />

Return Value:<br />

A resource template Buffer containing only GPIO Interrupt Connection descriptors.<br />

Example:<br />

Device (\_SB.GPI2)<br />

{<br />

Name(_HID, “XYZ0003”)<br />

Name(_UID, 2)<br />

//Third instance of this controller on the platform<br />

Name(_CRS, ResourceTemplate ()<br />

{<br />

//Register <strong>Interface</strong><br />

MEMORY32FIXED(ReadWrite, 0x30000000, 0x200, )<br />

//Interrupt line (GSIV 21)<br />

Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) {21}<br />

})<br />

Name(_AEI, ResourceTemplate ()<br />

{<br />

//Thermal Zone Event<br />

GpioInt(Edge, ActiveHigh, Exclusive, PullDown, , " \\_SB.GPI2") {14}<br />

//<strong>Power</strong> Button<br />

GpioInt(Edge, ActiveLow, ExclusiveAndWake, PullUp, , " \\_SB.GPI2") {36}<br />

})<br />

}<br />

248 April, 2015 Version 6.0

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

Saved successfully!

Ooh no, something went wrong!