summaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2011-12-20 21:40:21 +0100
committerGrant Likely <grant.likely@secretlab.ca>2012-01-04 11:37:42 -0700
commit1a0703ede4493bd74f9c6b53f782b749e175a88e (patch)
treeee86f6148f53af7ddcc329a28f45d7679642780d /include/asm-generic
parente198a8de14d4bb122b821432fadb28eedd4b4507 (diff)
downloadop-kernel-dev-1a0703ede4493bd74f9c6b53f782b749e175a88e.zip
op-kernel-dev-1a0703ede4493bd74f9c6b53f782b749e175a88e.tar.gz
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 <blogic@openwrt.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/gpio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index d466c8d..1ff4e22 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
/*
OpenPOWER on IntegriCloud