[coreboot-gerrit] Change in coreboot[master]: acpi_device: Add macro for GpioInt that uses both polarity

gerrit code review gerrit at coreboot.org
Thu Mar 16 16:24:51 CET 2017


>From Duncan Laurie <dlaurie at chromium.org>:

Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/18834 )

Change subject: acpi_device: Add macro for GpioInt that uses both polarity
......................................................................


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 at chromium.org>
Reviewed-on: https://review.coreboot.org/18834
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
Reviewed-by: Furquan Shaikh <furquan at google.com>
---
M src/arch/x86/include/arch/acpi_device.h
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Aaron Durbin: Looks good to me, approved
  build bot (Jenkins): Verified
  Furquan Shaikh: Looks good to me, approved



diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h
index 6933f31..084e8af 100644
--- a/src/arch/x86/include/arch/acpi_device.h
+++ b/src/arch/x86/include/arch/acpi_device.h
@@ -200,6 +200,15 @@
 	.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, \

-- 
To view, visit https://review.coreboot.org/18834
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I91408386538e442bddcacc9840e0aa14370a446c
Gerrit-PatchSet: 4
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi at intel.com>
Gerrit-Reviewer: build bot (Jenkins)



More information about the coreboot-gerrit mailing list