Re: [PATCH v2 14/15] PCI: j721e: add reset GPIO to struct j721e_pcie

Andy Shevchenko
2024-01-26T21:52:56Z

On Fri, Jan 26, 2024 at 4:38 PM Thomas Richard
<thomas.richard@bootlin.com> wrote:
>
> From: Théo Lebrun <theo.lebrun@bootlin.com>
>
> Add reset GPIO to struct j721e_pcie, so it can be used at suspend and
> resume stages.

...

> + pcie->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
> + if (IS_ERR(pcie->reset_gpio)) {
> + ret = PTR_ERR(pcie->reset_gpio);
> if (ret != -EPROBE_DEFER)
> dev_err(dev, "Failed to get reset GPIO\n");

A side note: At some point would be nice to see this being changed to simply

ret = dev_err_probe(...);
goto ...;

> goto err_get_sync;

--
With Best Regards,
Andy Shevchenko