summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-06-13 06:19:37 +0000
committerAnatolij Gustschin <agust@denx.de>2012-09-21 21:11:25 +0200
commit1bbd28d21518e3118e0a2d1da87084b6846e5b32 (patch)
treea74a4265a5df0e16b272fc37bdbc452afd032553 /include
parent3ab270d5df7ae7bf8d7b5d225ab1abb37297d77e (diff)
downloadu-boot-imx-1bbd28d21518e3118e0a2d1da87084b6846e5b32.zip
u-boot-imx-1bbd28d21518e3118e0a2d1da87084b6846e5b32.tar.gz
u-boot-imx-1bbd28d21518e3118e0a2d1da87084b6846e5b32.tar.bz2
Add gpio_request() to asm-generic header
This function should also be part of the GPIO API, so add it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/gpio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index c19e16c..23c9649 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -94,4 +94,13 @@ int gpio_get_value(unsigned gpio);
*/
int gpio_set_value(unsigned gpio, int value);
+/**
+ * Request a gpio. This should be called before any of the other functions
+ * are used on this gpio.
+ *
+ * @param gp GPIO number
+ * @param label User label for this GPIO
+ * @return 0 if ok, -1 on error
+ */
+int gpio_request(unsigned gpio, const char *label);
#endif /* _ASM_GENERIC_GPIO_H_ */