acpi_device: Add macro for GpioInt that uses both polarity

GPIO edge interrupts can report that they are ActiveBoth and will
generate an interrupt event on both rising and falling edges.

Add a macro so this type of GPIO interrupt can be used.

BUG=b:35581264
BRANCH=none
TEST=successfully use this interrupt type on Eve

Change-Id: I91408386538e442bddcacc9840e0aa14370a446c
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/18834
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Duncan Laurie 2017-03-15 11:14:57 -07:00
parent 9462e14065
commit 346cfe363e
1 changed files with 9 additions and 0 deletions

View File

@ -200,6 +200,15 @@ struct acpi_gpio {
.pin_count = 1, \ .pin_count = 1, \
.pins = { (gpio) } } .pins = { (gpio) } }
/* Edge Triggered Active Both GPIO interrupt */
#define ACPI_GPIO_IRQ_EDGE_BOTH(gpio) { \
.type = ACPI_GPIO_TYPE_INTERRUPT, \
.pull = ACPI_GPIO_PULL_DEFAULT, \
.irq.mode = ACPI_IRQ_EDGE_TRIGGERED, \
.irq.polarity = ACPI_IRQ_ACTIVE_BOTH, \
.pin_count = 1, \
.pins = { (gpio) } }
/* Level Triggered Active High GPIO interrupt */ /* Level Triggered Active High GPIO interrupt */
#define ACPI_GPIO_IRQ_LEVEL_HIGH(gpio) { \ #define ACPI_GPIO_IRQ_LEVEL_HIGH(gpio) { \
.type = ACPI_GPIO_TYPE_INTERRUPT, \ .type = ACPI_GPIO_TYPE_INTERRUPT, \