[coreboot-gerrit] Change in coreboot[master]: arch/x86/acpi_device: Provide macros for GPIO input with polarity

Furquan Shaikh (Code Review) gerrit at coreboot.org
Fri Jan 12 05:06:40 CET 2018


Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/23235


Change subject: arch/x86/acpi_device: Provide macros for GPIO input with polarity
......................................................................

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 at chromium.org>
---
M src/arch/x86/include/arch/acpi_device.h
1 file changed, 10 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/23235/1

diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h
index d4d82fc..4361c74 100644
--- a/src/arch/x86/include/arch/acpi_device.h
+++ b/src/arch/x86/include/arch/acpi_device.h
@@ -199,10 +199,19 @@
 	.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) } }
 

-- 
To view, visit https://review.coreboot.org/23235
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I77da6ad2f04d7f7bb6774df35105bdbe963d87d3
Gerrit-Change-Number: 23235
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180112/8831c782/attachment.html>


More information about the coreboot-gerrit mailing list