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

Andy Shevchenko andy.shevchenko at gmail.com
Fri Jan 26 13:52:18 PST 2024


On Fri, Jan 26, 2024 at 4:38 PM Thomas Richard
<thomas.richard at bootlin.com> wrote:
>
> From: Théo Lebrun <theo.lebrun at 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



More information about the linux-phy mailing list