summaryrefslogtreecommitdiff
path: root/include/gpio.h
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2016-01-13 11:14:23 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-01-19 14:24:40 -0800
commit6e4e1ccc8217ac8b318b885dae78b3c1996ca71e (patch)
tree02740e3467d89dce03726f6c6ed78d149b56335d /include/gpio.h
parente933d0b7b6984bc8abf40b3364695d9955a9a426 (diff)
downloadchrome-ec-6e4e1ccc8217ac8b318b885dae78b3c1996ca71e.tar.gz
GPIO: Add gpio_reset function
The gpio_reset function returns a GPIO to its initialy configured state. Using it removes a few more uses of gpio_list. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Change-Id: Ie24e8e8a96d0ff50f521a918e80ed2b379f8c1a9 Reviewed-on: https://chromium-review.googlesource.com/321951 Commit-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/gpio.h')
-rw-r--r--include/gpio.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/gpio.h b/include/gpio.h
index 117cd2a5ba..02bdcc4f6f 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -192,6 +192,17 @@ void gpio_set_flags(enum gpio_signal signal, int flags);
void gpio_set_level(enum gpio_signal signal, int value);
/**
+ * Reset the GPIO flags and alternate function state
+ *
+ * This returns the GPIO to it's default state of being a GPIO (not
+ * configured as an alternate function) with its default flags (those
+ * specified in gpio.inc when it was defined).
+ *
+ * @param signal Signal to reset
+ */
+void gpio_reset(enum gpio_signal signal);
+
+/**
* Enable interrupts for the signal.
*
* The signal must have been defined with