summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-30 21:47:09 -0600
committerSimon Glass <sjg@chromium.org>2017-06-01 07:03:10 -0600
commit150c5afe5bafa90e4fe398e59af32ad3cdbfe5b7 (patch)
tree15188b7974860d263fb7e5a0a19123a8897a63d4 /include/asm-generic
parent95795ad6cef37b29fcba5365860a8fa9c2f43898 (diff)
dm: gpio: Add live tree support
Add support for requesting GPIOs with a live device tree. This involves adjusting the function signature for the legacy function gpio_request_by_name_nodev(), so fix up all callers. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes to stm32f746-disco.c: Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/gpio.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index d78491dfc2..bf230c15ba 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -7,6 +7,8 @@
#ifndef _ASM_GENERIC_GPIO_H_
#define _ASM_GENERIC_GPIO_H_
+#include <dm/ofnode.h>
+
struct ofnode_phandle_args;
/*
@@ -488,9 +490,8 @@ int gpio_get_list_count(struct udevice *dev, const char *list_name);
* This is a version of gpio_request_list_by_name() that does not use a
* device. Avoid it unless the caller is not yet using driver model
*/
-int gpio_request_by_name_nodev(const void *blob, int node,
- const char *list_name,
- int index, struct gpio_desc *desc, int flags);
+int gpio_request_by_name_nodev(ofnode node, const char *list_name, int index,
+ struct gpio_desc *desc, int flags);
/**
* gpio_request_list_by_name_nodev() - request GPIOs without a device
@@ -498,8 +499,7 @@ int gpio_request_by_name_nodev(const void *blob, int node,
* This is a version of gpio_request_list_by_name() that does not use a
* device. Avoid it unless the caller is not yet using driver model
*/
-int gpio_request_list_by_name_nodev(const void *blob, int node,
- const char *list_name,
+int gpio_request_list_by_name_nodev(ofnode node, const char *list_name,
struct gpio_desc *desc_list, int max_count,
int flags);