
25 Apr
2015
25 Apr
'15
1:23 a.m.
On 24 April 2015 at 12:15, Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 24-04-15 20:10, Fabio Estevam wrote:
On Fri, Apr 24, 2015 at 10:48 AM, Hans de Goede hdegoede@redhat.com wrote:
sunxi_usbc->gpio_vbus = get_vbus_gpio(index);
if (sunxi_usbc->gpio_vbus != -1) {
if (sunxi_usbc->gpio_vbus >= 0) {
What about using dm_gpio_is_valid() instead?
dm_gpio_is_valid takes a struct gpio_desc *, where as this code is using good old gpio indexes (int). We will likely want to convert this to getting the gpio from devicetree directly in the future, but first we need this patch-set to convert all sunxi boards to the device-model, so that we can make such changes without the need to introduce a whole lot of #ifdef-s
I think this is a good first step, but have the same concern.
Reviewed-by: Simon Glass sjg@chromium.org
Regards,
Hans