On 12/07/2018 08:55 PM, Andrew Lunn wrote: >> + dev->reset_gpio = -1; >> + reset_gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, >> + &reset_gpio_flags); >> + if (reset_gpio >= 0) { >> + flags = (reset_gpio_flags == OF_GPIO_ACTIVE_LOW) ? >> + GPIOF_ACTIVE_LOW : 0; > > Can you use devm_gpiod_get_optional()? It makes this a lot simpler. > Take a look at mv88e6xxx/chip.c which also uses a GPIO for reset.
Done > You also need to update the binding documentation for this new > property. Will do in a separate patch. -- Best regards, Marek Vasut