diff options
author | Furquan Shaikh <furquan@chromium.org> | 2018-01-11 19:24:59 -0800 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-01-17 17:06:45 +0000 |
commit | 7332455a883d604554c4ceb78804b13962a87831 (patch) | |
tree | e4ebec5b261b58c9f5f14e17402769e517cfdd0d /src/arch/x86 | |
parent | da384dd7a4eea2fc4153c593026489cee5585895 (diff) |
arch/x86/acpi_device: Provide macros for GPIO input with polarity
Similar to ACPI_GPIO_OUTPUT, this change provides ACPI_GPIO_INPUT_*
macros with ACTIVE_LOW and ACTIVE_HIGH polarity.
Change-Id: I77da6ad2f04d7f7bb6774df35105bdbe963d87d3
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/23235
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/include/arch/acpi_device.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index d4d82fc1db..4361c740c9 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -199,10 +199,19 @@ struct acpi_gpio { .pins = { (gpio) } } /* Basic input GPIO with default pull settings */ -#define ACPI_GPIO_INPUT(gpio) { \ +#define ACPI_GPIO_INPUT_ACTIVE_HIGH(gpio) { \ .type = ACPI_GPIO_TYPE_IO, \ .pull = ACPI_GPIO_PULL_DEFAULT, \ .io_restrict = ACPI_GPIO_IO_RESTRICT_INPUT, \ + .polarity = ACPI_GPIO_ACTIVE_HIGH, \ + .pin_count = 1, \ + .pins = { (gpio) } } + +#define ACPI_GPIO_INPUT_ACTIVE_LOW(gpio) { \ + .type = ACPI_GPIO_TYPE_IO, \ + .pull = ACPI_GPIO_PULL_DEFAULT, \ + .io_restrict = ACPI_GPIO_IO_RESTRICT_INPUT, \ + .polarity = ACPI_GPIO_ACTIVE_LOW, \ .pin_count = 1, \ .pins = { (gpio) } } |