[PATCH 4/5] commands: gpio: add -d argument to set/get commands

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Wed Sep 28 06:37:30 PDT 2022


Ahmad Fatoum <a.fatoum at pengutronix.de> writes:

> For debugging, it can be useful to reference GPIOs relative to a
> controller, e.g.:
>
>   gpio_direction_output -d gpio4 20 1
>
> -	if (argc < count)
> +	if (optind < count)
>  		return COMMAND_ERROR_USAGE;

This change seems to make '-d ...' mandatory.  E.g.

| :/ gpio_get_value 65
| 
| gpio_get_value - return value of a GPIO pin
| 
| Usage: gpio_get_value [-d CONTROLLER] GPIO


Enrico



More information about the barebox mailing list