From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 13 Jun 2012 09:19:37 -0700 Subject: [U-Boot] [PATCH v2 01/19] Add gpio_request() to asm-generic header In-Reply-To: <1339604395-6621-1-git-send-email-sjg@chromium.org> References: <1339604395-6621-1-git-send-email-sjg@chromium.org> Message-ID: <1339604395-6621-2-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This function should also be part of the GPIO API, so add it. Signed-off-by: Simon Glass --- include/asm-generic/gpio.h | 9 +++++++++ 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_ */ -- 1.7.7.3