Hi Felipe,

On Fri, Jan 30, 2015 at 7:59 PM, Felipe Balbi <ba...@ti.com> wrote:

>> -     gpiod_direction_output(nop->gpiod_reset, !asserted);
>> +     if (asserted)
>> +             goto skip_delay;
>
> why skip it ?

Let's suppose we have an active-low GPIO USB phy reset pin.

In usb_gen_phy_init() we call nop_reset_set(nop, 0); and 'assert' is zero.

Then we do:

- Put the GPIO into 0
- Wait a bit
- Put it back to 1.

In usb_gen_phy_shutdown, we call nop_reset_set(nop, 1) and assert is one.

Then we should simply do:

- Put GPIO reset into 0.

,as we the PHY is no more in usage.

That's the reason we don't need the delay when assert is one.

Also, the code prior to the gpiod introduction also skips the delay
for the assert == 1 case, so this patch restores the original
behaviour.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to