arch/x86/acpi_device: Add macros to define gpio with wake flag

This patch adds new macros to define gpio with an option to either
enable irq wake (mark it as ExclusiveAndWake flag in SSDT) or disable
it (mark it as just Exclusive flag in SSDT).

Change-Id: Ia71559dcae65112b75e4c789328e4a6153e922b0
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Reviewed-on: https://review.coreboot.org/25838
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Harsha Priya 2018-04-25 13:57:55 -07:00 committed by Martin Roth
parent f9de5a4b43
commit a850717dc7
1 changed files with 30 additions and 0 deletions

View File

@ -242,6 +242,36 @@ struct acpi_gpio {
.pin_count = 1, \
.pins = { (gpio) } }
/* Edge Triggered Active High GPIO interrupt with wake */
#define ACPI_GPIO_IRQ_EDGE_HIGH_WAKE(gpio) { \
.type = ACPI_GPIO_TYPE_INTERRUPT, \
.pull = ACPI_GPIO_PULL_DEFAULT, \
.irq.mode = ACPI_IRQ_EDGE_TRIGGERED, \
.irq.polarity = ACPI_IRQ_ACTIVE_HIGH, \
.irq.wake = ACPI_IRQ_WAKE, \
.pin_count = 1, \
.pins = { (gpio) } }
/* Edge Triggered Active Low GPIO interrupt with wake */
#define ACPI_GPIO_IRQ_EDGE_LOW_WAKE(gpio) { \
.type = ACPI_GPIO_TYPE_INTERRUPT, \
.pull = ACPI_GPIO_PULL_DEFAULT, \
.irq.mode = ACPI_IRQ_EDGE_TRIGGERED, \
.irq.polarity = ACPI_IRQ_ACTIVE_LOW, \
.irq.wake = ACPI_IRQ_WAKE, \
.pin_count = 1, \
.pins = { (gpio) } }
/* Edge Triggered Active Both GPIO interrupt with wake */
#define ACPI_GPIO_IRQ_EDGE_BOTH_WAKE(gpio) { \
.type = ACPI_GPIO_TYPE_INTERRUPT, \
.pull = ACPI_GPIO_PULL_DEFAULT, \
.irq.mode = ACPI_IRQ_EDGE_TRIGGERED, \
.irq.polarity = ACPI_IRQ_ACTIVE_BOTH, \
.irq.wake = ACPI_IRQ_WAKE, \
.pin_count = 1, \
.pins = { (gpio) } }
/* Level Triggered Active High GPIO interrupt */
#define ACPI_GPIO_IRQ_LEVEL_HIGH(gpio) { \
.type = ACPI_GPIO_TYPE_INTERRUPT, \