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

From: Andy Shevchenko
Date: Fri Jan 26 2024 - 16:56:02 EST


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