[PATCH v15 17/17] PCI: imx6: Reformat suspend callback to keep symmetric with resume

Guenter Roeck linux at roeck-us.net
Mon Jul 18 06:19:00 PDT 2022


On Thu, Jul 14, 2022 at 03:31:09PM +0800, Richard Zhu wrote:
> Create imx6_pcie_stop_link() and imx6_pcie_host_exit() functions.
> Encapsulate clocks, regulators disables and PHY uninitialization into
> imx6_pcie_host_exit().
> 
> To keep suspend/resume symmetric as much as possible, invoke these two
> new created functions in suspend callback.
> 
> To be symmetric with imx6_pcie_host_exit(), move imx6_pcie_clk_enable()
> to imx6_pcie_host_init() from imx6_pcie_deassert_core_reset().
> 
> Link: https://lore.kernel.org/r/1656645935-1370-18-git-send-email-hongxing.zhu@nxp.com
> Signed-off-by: Richard Zhu <hongxing.zhu at nxp.com>
> Signed-off-by: Bjorn Helgaas <bhelgaas at google.com>
> Reviewed-by: Lucas Stach <l.stach at pengutronix.de>

If CONFIG_PM_SLEEP=n:

Error log:
drivers/pci/controller/dwc/pci-imx6.c:973:13: error: 'imx6_pcie_host_exit' defined but not used [-Werror=unused-function]
  973 | static void imx6_pcie_host_exit(struct dw_pcie_rp *pp)
      |             ^~~~~~~~~~~~~~~~~~~
drivers/pci/controller/dwc/pci-imx6.c:904:13: error: 'imx6_pcie_stop_link' defined but not used [-Werror=unused-function]
  904 | static void imx6_pcie_stop_link(struct dw_pcie *pci)

Guenter



More information about the linux-arm-kernel mailing list