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>
This commit is contained in:
Furquan Shaikh 2018-01-11 19:24:59 -08:00 committed by Martin Roth
parent da384dd7a4
commit 7332455a88
1 changed files with 10 additions and 1 deletions

View File

@ -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) } }