Message ID | 1429378427-32319-4-git-send-email-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
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,
With driver model we should not use this function. Drivers should use device tree to find their GPIOs. Signed-off-by: Simon Glass <sjg@chromium.org> --- common/cmd_gpio.c | 7 +++++++ 1 file changed, 7 insertions(+)