From efe99579741f15d3d287b116b2e461b0f41cf5d0 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Wed, 15 Mar 2017 11:14:57 -0700 Subject: [PATCH] UPSTREAM: 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: I8787e410da3e142c7c66cc7ef2de9b62fe50cc6a Signed-off-by: Patrick Georgi Original-Commit-Id: 346cfe363ee79da6a59611b8b24f5ad01053ea01 Original-Change-Id: I91408386538e442bddcacc9840e0aa14370a446c Original-Signed-off-by: Duncan Laurie Original-Reviewed-on: https://review.coreboot.org/18834 Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Aaron Durbin Original-Reviewed-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/456303 --- src/arch/x86/include/arch/acpi_device.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index 6933f315ba..084e8afe5e 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -200,6 +200,15 @@ struct acpi_gpio { .pin_count = 1, \ .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 */ #define ACPI_GPIO_IRQ_LEVEL_HIGH(gpio) { \ .type = ACPI_GPIO_TYPE_INTERRUPT, \