[U-Boot] [PATCH v8 2/4] gpio: Replace ARM gpio.h with the common API in include/asm-generic

Stephen Warren swarren at nvidia.com
Mon Nov 7 17:35:33 CET 2011


Joe Hershberger wrote at Friday, November 04, 2011 8:25 PM:
> ARM boards should use the generic GPIO API
> Update the existing gpio implementations to conform the the generic API

The Tegra changes look mostly OK, but:

a) They are almost entirely unrelated to this patch description; most of
the diff is variable renaming and nothing to do with conforming to the API.

b) I've CC'd the main Tegra maintainers to give final comment.

c) Some comments below.

> diff --git a/drivers/gpio/tegra2_gpio.c b/drivers/gpio/tegra2_gpio.c
...
> -void gpio_free(int gp)
> +int gpio_free(unsigned gpio)
>  {
> +	return 0;
>  }

If you're doing a cleanup pass on this driver, you may as well make
gpio_free() do something; it should probably clear gpio_names[gpio].name
and perhaps set the pin back to SFIO - in other words, undo gpio_reqeust().

> -void gpio_toggle_value(int gp)
> -{
> -	gpio_set_value(gp, !gpio_get_output_value(gp));

You should probably at least mention this function being removed in the
commit description. I hope nothing is using it.

-- 
nvpublic



More information about the U-Boot mailing list