summaryrefslogtreecommitdiff
path: root/include/asm-generic/gpio.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-14 07:01:11 -0400
committerTom Rini <trini@konsulko.com>2015-05-14 07:01:11 -0400
commit9597494ebfb60418e8a0e7565cca2b7d25512bf5 (patch)
tree3d84f37f77b366526bd7316ed74f0218ef4f0dd6 /include/asm-generic/gpio.h
parent14539bad49f0a2a53db2d57658de55ab89ab5758 (diff)
parent237c36379c76f7f6647bb11c03aa9c5cb9a4972f (diff)
downloadu-boot-imx-9597494ebfb60418e8a0e7565cca2b7d25512bf5.zip
u-boot-imx-9597494ebfb60418e8a0e7565cca2b7d25512bf5.tar.gz
u-boot-imx-9597494ebfb60418e8a0e7565cca2b7d25512bf5.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-tegra
Diffstat (limited to 'include/asm-generic/gpio.h')
-rw-r--r--include/asm-generic/gpio.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 3b96b82..4752ea4 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -336,15 +336,24 @@ int gpio_lookup_name(const char *name, struct udevice **devp,
unsigned int *offsetp, unsigned int *gpiop);
/**
- * get_gpios() - Turn the values of a list of GPIOs into an integer
+ * gpio_get_values_as_int() - Turn the values of a list of GPIOs into an int
*
* This puts the value of the first GPIO into bit 0, the second into bit 1,
* etc. then returns the resulting integer.
*
* @gpio_list: List of GPIOs to collect
- * @return resulting integer value
+ * @return resulting integer value, or -ve on error
*/
-unsigned gpio_get_values_as_int(const int *gpio_list);
+int gpio_get_values_as_int(const int *gpio_list);
+
+/**
+ * gpio_claim_vector() - claim a number of GPIOs for input
+ *
+ * @gpio_num_array: array of gpios to claim, terminated by -1
+ * @fmt: format string for GPIO names, e.g. "board_id%d"
+ * @return 0 if OK, -ve on error
+ */
+int gpio_claim_vector(const int *gpio_num_array, const char *fmt);
/**
* gpio_request_by_name() - Locate and request a GPIO by name