From: Simon Glass Date: Wed, 13 Jun 2012 06:19:37 +0000 (+0000) Subject: Add gpio_request() to asm-generic header X-Git-Tag: v2012.10-rc1~1^2~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1bbd28d21518e3118e0a2d1da87084b6846e5b32;p=oweals%2Fu-boot.git 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 --- diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index c19e16cd21..23c9649403 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_ */