On 24 April 2015 at 12:15, Hans de Goede <hdego...@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 <hdego...@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 <s...@chromium.org>

> Regards,
>
> Hans
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to