Re: [PATCH v2 15/15] PCI: j721e: add suspend and resume support

Andy Shevchenko
2024-01-26T21:55:41Z

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 suspend and resume support. Only the rc mode is supported.
>
> During the suspend stage PERST# is asserted, then deasserted during the
> resume stage.

...

> +static int j721e_pcie_suspend_noirq(struct device *dev)
> +{
> + struct j721e_pcie *pcie = dev_get_drvdata(dev);
> +
> + if (pcie->mode == PCI_MODE_RC) {
> + gpiod_set_value_cansleep(pcie->reset_gpio, 0);
> + clk_disable_unprepare(pcie->refclk);

Same Q as in a few mails before: Do you need unprepare? What will be
the benefit from a PM perspective?

> + }
> +
> + cdns_pcie_disable_phy(pcie->cdns_pcie);
> +
> + return 0;
> +}

--
With Best Regards,
Andy Shevchenko