Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571836
| From | Lucas Stach <l.stach@pengutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/3] PCI: imx6: Allow probe deferal by reset GPIO |
| Date | 2017-02-01 18:50 +0100 |
| Message-ID | <t67cC-tm-17@gated-at.bofh.it> (permalink) |
| References | <t66qe-8ov-23@gated-at.bofh.it> <t66zU-fo-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Am Mittwoch, den 01.02.2017, 08:55 -0800 schrieb Andrey Smirnov:
> Some designs implement reset GPIO via a GPIO expander connected to a
> peripheral bus. One such example would be i.MX7 Sabre board where said
> GPIO is provided by SPI shift register connected to a bitbanged SPI
> bus. In order to support such designs allow reset GPIO request to defer
> probing of the driver.
>
> Cc: yurovsky@gmail.com
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/pci/host/pci-imx6.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
> index 50a1291..3ef8093 100644
> --- a/drivers/pci/host/pci-imx6.c
> +++ b/drivers/pci/host/pci-imx6.c
> @@ -611,7 +611,7 @@ static int __init imx6_add_pcie_port(struct imx6_pcie *imx6_pcie,
> return 0;
> }
>
> -static int __init imx6_pcie_probe(struct platform_device *pdev)
> +static int imx6_pcie_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct imx6_pcie *imx6_pcie;
> @@ -653,6 +653,8 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
> dev_err(dev, "unable to get reset gpio\n");
> return ret;
> }
> + } else if (imx6_pcie->reset_gpio == -EPROBE_DEFER) {
> + return imx6_pcie->reset_gpio;
> }
>
> /* Fetch clocks */
> @@ -746,11 +748,12 @@ static struct platform_driver imx6_pcie_driver = {
> .name = "imx6q-pcie",
> .of_match_table = imx6_pcie_of_match,
> },
> + .probe = imx6_pcie_probe,
> .shutdown = imx6_pcie_shutdown,
> };
>
> static int __init imx6_pcie_init(void)
> {
> - return platform_driver_probe(&imx6_pcie_driver, imx6_pcie_probe);
> + return platform_driver_register(&imx6_pcie_driver);
> }
> device_initcall(imx6_pcie_init);
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 0/3] i.MX7 PCI support Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-02-01 18:00 +0100
[PATCH v2 3/3] PCI: imx6: Add code to support i.MX7D Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-02-01 18:00 +0100
Re: [PATCH v2 3/3] PCI: imx6: Add code to support i.MX7D Lucas Stach <l.stach@pengutronix.de> - 2017-02-01 19:00 +0100
Re: [PATCH v2 3/3] PCI: imx6: Add code to support i.MX7D Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-02-02 18:10 +0100
[PATCH v2 1/3] PCI: imx6: Fix a typo in error message Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-02-01 18:10 +0100
[PATCH v2 2/3] PCI: imx6: Allow probe deferal by reset GPIO Andrey Smirnov <andrew.smirnov@gmail.com> - 2017-02-01 18:10 +0100
Re: [PATCH v2 2/3] PCI: imx6: Allow probe deferal by reset GPIO Lucas Stach <l.stach@pengutronix.de> - 2017-02-01 18:50 +0100
csiph-web