> +     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.

You also need to update the binding documentation for this new
property.

        Andrew

Reply via email to