On Wed, Jun 5, 2024 at 1:55 PM Hui Wang <hui.wang@xxxxxxxxxxxxx> wrote: > On 6/5/24 18:30, Maarten Brock wrote: > >> From: Hugo Villeneuve <hugo@xxxxxxxxxxx> > >> Sent: Tuesday, 4 June 2024 16:23 <...> > >> Add function description from original comment "Reset device, > >> purging any pending irq / data", since the comment applies to both > >> hardware and software reset, > > No it does not (at this moment). See below. ... > > The problem here is that this only deasserts the reset if it were asserted before. > > Nothing happens if it already was deasserted. This makes the delay also pretty > > useless. > > > > To make this a proper reset pulse for the device you must first assert the reset, > > then wait >3us, and finally deassert the reset. > My understanding is when calling devm_gpiod_get_optional(dev, "reset", > GPIOD_OUT_LOW) and returning a valid (gpio_desc *), the flag > GPIOD_OUT_LOW guarantees the GPIO is set to output and low (assert the > reset pin). No, this is logical, not physical state. Maarten is correct. How did you test this? -- With Best Regards, Andy Shevchenko