]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Add gpio_request() to asm-generic header
authorSimon Glass <sjg@chromium.org>
Wed, 13 Jun 2012 06:19:37 +0000 (06:19 +0000)
committerAnatolij Gustschin <agust@denx.de>
Fri, 21 Sep 2012 19:11:25 +0000 (21:11 +0200)
This function should also be part of the GPIO API, so add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/asm-generic/gpio.h

index c19e16cd21dc80cab6c42bfb9a2671ce908231dd..23c964940312efc36f4dffac82292a141c1050b6 100644 (file)
@@ -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_ */