With driver model we should not use this function. Drivers should use device
tree to find their GPIOs.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 common/cmd_gpio.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c
index 65d6df4..9dae011 100644
--- a/common/cmd_gpio.c
+++ b/common/cmd_gpio.c
@@ -12,10 +12,17 @@
 #include <dm.h>
 #include <asm/gpio.h>
 
+/*
+ * Don't use this function with driver model. Use gpio_request_by_name() and
+ * similar. We should use a struct gpio_desc for GPIOs for specifying a GPIO,
+ * not an integer.
+ */
+#ifndef CONFIG_DM_GPIO
 __weak int name_to_gpio(const char *name)
 {
        return simple_strtoul(name, NULL, 10);
 }
+#endif
 
 enum gpio_cmd {
        GPIO_INPUT,
-- 
2.2.0.rc0.207.ga3a616c

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to