From 1a0703ede4493bd74f9c6b53f782b749e175a88e Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 20 Dec 2011 21:40:21 +0100 Subject: GPIO: add bindings for managed devices This patch adds 2 functions that allow managed devices to request GPIOs. These GPIOs will then be managed by drivers/base/devres.c. Signed-off-by: John Crispin Signed-off-by: Grant Likely --- include/asm-generic/gpio.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/asm-generic') diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index d466c8d8826d..1ff4e221cb4d 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -177,6 +177,10 @@ extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *labe extern int gpio_request_array(const struct gpio *array, size_t num); extern void gpio_free_array(const struct gpio *array, size_t num); +/* bindings for managed devices that want to request gpios */ +int devm_gpio_request(struct device *dev, unsigned gpio, const char *label); +void devm_gpio_free(struct device *dev, unsigned int gpio); + #ifdef CONFIG_GPIO_SYSFS /* -- cgit v1.2.1