On 05/06/2024 13:19, Maarten Brock wrote: >>> To make this a proper reset pulse for the device you must first assert the reset, >>> then wait >3us, and finally deassert the reset. >>> >>> Maarten Brock >> Hi Maarten, >> >> 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). > > Ah, right. Sorry, I missed that. > So GPIOD_OUT_LOW disregards the inversion from GPIO_ACTIVE_LOW. It doesn't. > And gpiod_set_value_cansleep(reset_gpiod, 0) uses the inversion to make the pin high. > Looks fine to me now. They both respect pin polarity. Best regards, Krzysztof