This function should also be part of the GPIO API, so add it. Signed-off-by: Simon Glass <s...@chromium.org> ---
include/asm-generic/gpio.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index a1ebb28..c1d697f 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -72,3 +72,13 @@ int gpio_get_value(int gp); * @return 0 if ok, -1 on error */ int gpio_set_value(int gp, 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); -- 1.7.3.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot