summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2023-03-17 23:12:22 +0300
committerTom Rini <trini@konsulko.com>2023-03-30 22:09:59 +0300
commite1c97949ee922ccc84c4ef4364c9810aa76f6306 (patch)
treea64c106aa1c54001e61e02de15ff3d45fbe90332 /include/asm-generic
parentfdef6b982f0a24d4b3a83d107da4f817efa4566f (diff)
downloadu-boot-e1c97949ee922ccc84c4ef4364c9810aa76f6306.tar.xz
gpio: allow passing NULL to gpio_request_by_line_name() to search all gpio controllers
The API is more convenient to use if one doesn't have to know upfront which gpio controller has a line with the name one is searching for, and arrange to look that device up somehow. Or implement this loop oneself. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/gpio.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index dd0bdf2315..c4a7fd2843 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -580,7 +580,8 @@ int gpio_request_by_name(struct udevice *dev, const char *list_name,
* This allows boards to implement common behaviours using GPIOs while not
* requiring specific GPIO offsets be used.
*
- * @dev: An instance of a GPIO controller udevice
+ * @dev: An instance of a GPIO controller udevice, or NULL to search
+ * all GPIO controller devices
* @line_name: The name of the GPIO (e.g. "bmc-secure-boot")
* @desc: A GPIO descriptor that is populated with the requested GPIO
* upon return