From 7332455a883d604554c4ceb78804b13962a87831 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 11 Jan 2018 19:24:59 -0800 Subject: 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 Reviewed-on: https://review.coreboot.org/23235 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie Reviewed-by: Aaron Durbin Reviewed-by: Paul Menzel --- src/arch/x86/include/arch/acpi_device.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') 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) } } -- cgit v1.2.3