]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: j721e: Add reset GPIO to struct j721e_pcie
authorThéo Lebrun <theo.lebrun@bootlin.com>
Wed, 19 Jun 2024 10:15:12 +0000 (12:15 +0200)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Tue, 3 Sep 2024 18:27:16 +0000 (18:27 +0000)
Add reset GPIO to struct j721e_pcie, so it can be used at suspend and
resume stages.

Link: https://lore.kernel.org/linux-pci/20240102-j7200-pcie-s2r-v7-4-a2f9156da6c3@bootlin.com
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
drivers/pci/controller/cadence/pci-j721e.c

index 46d47285ce74c338d07ba9a2687339d2301e7b3c..c7f40920e061eee81806c9bb96fc8bf36b444d89 100644 (file)
@@ -53,6 +53,7 @@ struct j721e_pcie {
        u32                     mode;
        u32                     num_lanes;
        u32                     max_lanes;
+       struct gpio_desc        *reset_gpio;
        void __iomem            *user_cfg_base;
        void __iomem            *intd_cfg_base;
        u32                     linkdown_irq_regfield;
@@ -545,6 +546,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)
                        ret = dev_err_probe(dev, PTR_ERR(gpiod), "Failed to get reset GPIO\n");
                        goto err_get_sync;
                }
+               pcie->reset_gpio = gpiod;
 
                ret = cdns_pcie_init_phy(dev, cdns_pcie);
                if (ret) {