summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-07-06 22:37:10 -0500
committerAaron Durbin <adurbin@chromium.org>2016-07-07 20:44:36 +0200
commitf41ac2298eb61f2a524731a07c915416d562f17c (patch)
tree08985e62901557a5c4fa1914ec788c58bb2149db /src/include
parent85d80276281e179b4e6a896e731090e9580ce8b9 (diff)
lib/gpio: add pullup & pulldown gpio_base2_value() variants
Provide common implementations for gpio_base2_value() variants which configure the gpio for internal pullups and pulldowns. BUG=chrome-os-partner:54949 BRANCH=None TEST=Built and used on reef for memory config. Change-Id: I9be8813328e99d28eb4145501450caab25d51f37 Signed-off-by: Aaron Durbin <adurbin@chromuim.org> Reviewed-on: https://review.coreboot.org/15557 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpio.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/gpio.h b/src/include/gpio.h
index 69a0828f58..3a8951ca73 100644
--- a/src/include/gpio.h
+++ b/src/include/gpio.h
@@ -56,8 +56,13 @@ uint16_t gpio_acpi_pin(gpio_t gpio);
*
* gpio[]: pin positions to read. gpio[0] is less significant than gpio[1].
* num_gpio: number of pins to read.
+ *
+ * There are also pulldown and pullup variants which default each gpio to
+ * be configured with an internal pulldown and pullup, respectively.
*/
int gpio_base2_value(gpio_t gpio[], int num_gpio);
+int gpio_pulldown_base2_value(gpio_t gpio[], int num_gpio);
+int gpio_pullup_base2_value(gpio_t gpio[], int num_gpio);
/*
* Read the value presented by the set of GPIOs, when each pin is interpreted