[U-Boot] [PATCH 3/5] dm: gpio: Remove default declaration of name_to_gpio()
Simon Glass
sjg at chromium.org
Sat Apr 18 19:33:45 CEST 2015
With driver model we should not use this function. Drivers should use device
tree to find their GPIOs.
Signed-off-by: Simon Glass <sjg at 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
More information about the U-Boot
mailing list