summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2019-07-17 06:59:51 +0200
committerTom Rini <trini@konsulko.com>2019-07-29 09:32:10 -0400
commit49b10cb4926285b856b207c1f5bb40c75487f08b (patch)
tree5fabb5d8f10d8f0ab412d6abbe168dbec7965ff9 /include
parent5917d0b877af8d553934c77247f1aa75f2dd048b (diff)
gpio: fixes for gpio-hog support
recently added gpio hog patch was "in discussion" state with Simon Glass. This patch now adds most of comments from Simon Glass. Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/gpio.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 37f71e5708..d6cf18744f 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -352,9 +352,10 @@ int dm_gpio_lookup_name(const char *name, struct gpio_desc *desc);
* gpio_hog_lookup_name() - Look up a named GPIO and return the gpio descr.
*
* @name: Name to look up
- * @return: Returns gpio_desc for gpio
+ * @desc: Returns GPIO description, on success, else NULL
+ * @return: Returns 0 if OK, else -ENODEV
*/
-struct gpio_desc *gpio_hog_lookup_name(const char *name);
+int gpio_hog_lookup_name(const char *name, struct gpio_desc **desc);
/**
* gpio_hog_probe_all() - probe all gpio devices with
@@ -523,12 +524,13 @@ int gpio_request_list_by_name_nodev(ofnode node, const char *list_name,
* gpio_dev_request_index() - request single GPIO from gpio device
*
* @dev: GPIO device
- * @nodename: Name of node
+ * @nodename: Name of node for which gpio gets requested, used
+ * for the gpio label name
* @list_name: Name of GPIO list (e.g. "board-id-gpios")
* @index: Index number of the GPIO in that list use request (0=first)
* @flags: GPIOD_* flags
- * @dtflags: GPIO flags read from DT
- * @desc: GPIO descriotor filled from this function
+ * @dtflags: GPIO flags read from DT defined see GPIOD_*
+ * @desc: returns GPIO descriptor filled from this function
* @return: return value from gpio_request_tail()
*/
int gpio_dev_request_index(struct udevice *dev, const char *nodename,