diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2019-09-23 17:10:26 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-09-23 17:10:26 -0400 |
commit | e4faafbf5c3f5ec9242583c920542eceda2b6fab (patch) | |
tree | b0d2b32c93d4b39068337661f84091f375987d7f | |
parent | 8b38b5f2cf928b80f83daff55e2242f40565ce02 (diff) | |
parent | 716c6a228ec9635e4b524f9c01aac089c5dd6ed5 (diff) |
Merge branch 'remotes/lorenzo/pci/misc'
- Propagate regulator_get_optional() errors so callers can distinguish
real errors from optional regulators that are absent (Thierry Reding)
- Propagate devm_of_phy_get() errors so callers can distinguish
real errors from optional PHYs that are absent (Thierry Reding)
- Add Andrew Murray as PCI native driver reviewer (Lorenzo Pieralisi)
* remotes/lorenzo/pci/misc:
MAINTAINERS: Add PCI native host/endpoint controllers designated reviewer
PCI: iproc: Propagate errors for optional PHYs
PCI: histb: Propagate errors for optional regulators
PCI: armada8x: Propagate errors for optional PHYs
PCI: imx6: Propagate errors for optional regulators
PCI: exynos: Propagate errors for optional PHYs
PCI: rockchip: Propagate errors for optional regulators
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | drivers/pci/controller/dwc/pci-exynos.c | 2 | ||||
-rw-r--r-- | drivers/pci/controller/dwc/pci-imx6.c | 4 | ||||
-rw-r--r-- | drivers/pci/controller/dwc/pcie-armada8k.c | 7 | ||||
-rw-r--r-- | drivers/pci/controller/dwc/pcie-histb.c | 4 | ||||
-rw-r--r-- | drivers/pci/controller/pcie-iproc-platform.c | 9 | ||||
-rw-r--r-- | drivers/pci/controller/pcie-rockchip-host.c | 16 |
7 files changed, 20 insertions, 23 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index d200b16fa95c..d88e268271d7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -12442,6 +12442,7 @@ F: arch/x86/kernel/early-quirks.c | |||
12442 | 12442 | ||
12443 | PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS | 12443 | PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS |
12444 | M: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 12444 | M: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> |
12445 | R: Andrew Murray <andrew.murray@arm.com> | ||
12445 | L: linux-pci@vger.kernel.org | 12446 | L: linux-pci@vger.kernel.org |
12446 | Q: http://patchwork.ozlabs.org/project/linux-pci/list/ | 12447 | Q: http://patchwork.ozlabs.org/project/linux-pci/list/ |
12447 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/ | 12448 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/ |
diff --git a/drivers/pci/controller/dwc/pci-exynos.c b/drivers/pci/controller/dwc/pci-exynos.c index cee5f2f590e2..14a6ba4067fb 100644 --- a/drivers/pci/controller/dwc/pci-exynos.c +++ b/drivers/pci/controller/dwc/pci-exynos.c | |||
@@ -465,7 +465,7 @@ static int __init exynos_pcie_probe(struct platform_device *pdev) | |||
465 | 465 | ||
466 | ep->phy = devm_of_phy_get(dev, np, NULL); | 466 | ep->phy = devm_of_phy_get(dev, np, NULL); |
467 | if (IS_ERR(ep->phy)) { | 467 | if (IS_ERR(ep->phy)) { |
468 | if (PTR_ERR(ep->phy) == -EPROBE_DEFER) | 468 | if (PTR_ERR(ep->phy) != -ENODEV) |
469 | return PTR_ERR(ep->phy); | 469 | return PTR_ERR(ep->phy); |
470 | 470 | ||
471 | ep->phy = NULL; | 471 | ep->phy = NULL; |
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 8b8efa3063f5..acfbd34032a8 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c | |||
@@ -1174,8 +1174,8 @@ static int imx6_pcie_probe(struct platform_device *pdev) | |||
1174 | 1174 | ||
1175 | imx6_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, "vpcie"); | 1175 | imx6_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, "vpcie"); |
1176 | if (IS_ERR(imx6_pcie->vpcie)) { | 1176 | if (IS_ERR(imx6_pcie->vpcie)) { |
1177 | if (PTR_ERR(imx6_pcie->vpcie) == -EPROBE_DEFER) | 1177 | if (PTR_ERR(imx6_pcie->vpcie) != -ENODEV) |
1178 | return -EPROBE_DEFER; | 1178 | return PTR_ERR(imx6_pcie->vpcie); |
1179 | imx6_pcie->vpcie = NULL; | 1179 | imx6_pcie->vpcie = NULL; |
1180 | } | 1180 | } |
1181 | 1181 | ||
diff --git a/drivers/pci/controller/dwc/pcie-armada8k.c b/drivers/pci/controller/dwc/pcie-armada8k.c index 3d55dc78d999..49596547e8c2 100644 --- a/drivers/pci/controller/dwc/pcie-armada8k.c +++ b/drivers/pci/controller/dwc/pcie-armada8k.c | |||
@@ -118,11 +118,10 @@ static int armada8k_pcie_setup_phys(struct armada8k_pcie *pcie) | |||
118 | 118 | ||
119 | for (i = 0; i < ARMADA8K_PCIE_MAX_LANES; i++) { | 119 | for (i = 0; i < ARMADA8K_PCIE_MAX_LANES; i++) { |
120 | pcie->phy[i] = devm_of_phy_get_by_index(dev, node, i); | 120 | pcie->phy[i] = devm_of_phy_get_by_index(dev, node, i); |
121 | if (IS_ERR(pcie->phy[i]) && | ||
122 | (PTR_ERR(pcie->phy[i]) == -EPROBE_DEFER)) | ||
123 | return PTR_ERR(pcie->phy[i]); | ||
124 | |||
125 | if (IS_ERR(pcie->phy[i])) { | 121 | if (IS_ERR(pcie->phy[i])) { |
122 | if (PTR_ERR(pcie->phy[i]) != -ENODEV) | ||
123 | return PTR_ERR(pcie->phy[i]); | ||
124 | |||
126 | pcie->phy[i] = NULL; | 125 | pcie->phy[i] = NULL; |
127 | continue; | 126 | continue; |
128 | } | 127 | } |
diff --git a/drivers/pci/controller/dwc/pcie-histb.c b/drivers/pci/controller/dwc/pcie-histb.c index 954bc2b74bbc..811b5c6d62ea 100644 --- a/drivers/pci/controller/dwc/pcie-histb.c +++ b/drivers/pci/controller/dwc/pcie-histb.c | |||
@@ -340,8 +340,8 @@ static int histb_pcie_probe(struct platform_device *pdev) | |||
340 | 340 | ||
341 | hipcie->vpcie = devm_regulator_get_optional(dev, "vpcie"); | 341 | hipcie->vpcie = devm_regulator_get_optional(dev, "vpcie"); |
342 | if (IS_ERR(hipcie->vpcie)) { | 342 | if (IS_ERR(hipcie->vpcie)) { |
343 | if (PTR_ERR(hipcie->vpcie) == -EPROBE_DEFER) | 343 | if (PTR_ERR(hipcie->vpcie) != -ENODEV) |
344 | return -EPROBE_DEFER; | 344 | return PTR_ERR(hipcie->vpcie); |
345 | hipcie->vpcie = NULL; | 345 | hipcie->vpcie = NULL; |
346 | } | 346 | } |
347 | 347 | ||
diff --git a/drivers/pci/controller/pcie-iproc-platform.c b/drivers/pci/controller/pcie-iproc-platform.c index 5a3550b6bb29..9ee6200a66f4 100644 --- a/drivers/pci/controller/pcie-iproc-platform.c +++ b/drivers/pci/controller/pcie-iproc-platform.c | |||
@@ -93,12 +93,9 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev) | |||
93 | pcie->need_ib_cfg = of_property_read_bool(np, "dma-ranges"); | 93 | pcie->need_ib_cfg = of_property_read_bool(np, "dma-ranges"); |
94 | 94 | ||
95 | /* PHY use is optional */ | 95 | /* PHY use is optional */ |
96 | pcie->phy = devm_phy_get(dev, "pcie-phy"); | 96 | pcie->phy = devm_phy_optional_get(dev, "pcie-phy"); |
97 | if (IS_ERR(pcie->phy)) { | 97 | if (IS_ERR(pcie->phy)) |
98 | if (PTR_ERR(pcie->phy) == -EPROBE_DEFER) | 98 | return PTR_ERR(pcie->phy); |
99 | return -EPROBE_DEFER; | ||
100 | pcie->phy = NULL; | ||
101 | } | ||
102 | 99 | ||
103 | ret = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, &resources, | 100 | ret = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, &resources, |
104 | &iobase); | 101 | &iobase); |
diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c index 8d20f1793a61..ef8e677ce9d1 100644 --- a/drivers/pci/controller/pcie-rockchip-host.c +++ b/drivers/pci/controller/pcie-rockchip-host.c | |||
@@ -608,29 +608,29 @@ static int rockchip_pcie_parse_host_dt(struct rockchip_pcie *rockchip) | |||
608 | 608 | ||
609 | rockchip->vpcie12v = devm_regulator_get_optional(dev, "vpcie12v"); | 609 | rockchip->vpcie12v = devm_regulator_get_optional(dev, "vpcie12v"); |
610 | if (IS_ERR(rockchip->vpcie12v)) { | 610 | if (IS_ERR(rockchip->vpcie12v)) { |
611 | if (PTR_ERR(rockchip->vpcie12v) == -EPROBE_DEFER) | 611 | if (PTR_ERR(rockchip->vpcie12v) != -ENODEV) |
612 | return -EPROBE_DEFER; | 612 | return PTR_ERR(rockchip->vpcie12v); |
613 | dev_info(dev, "no vpcie12v regulator found\n"); | 613 | dev_info(dev, "no vpcie12v regulator found\n"); |
614 | } | 614 | } |
615 | 615 | ||
616 | rockchip->vpcie3v3 = devm_regulator_get_optional(dev, "vpcie3v3"); | 616 | rockchip->vpcie3v3 = devm_regulator_get_optional(dev, "vpcie3v3"); |
617 | if (IS_ERR(rockchip->vpcie3v3)) { | 617 | if (IS_ERR(rockchip->vpcie3v3)) { |
618 | if (PTR_ERR(rockchip->vpcie3v3) == -EPROBE_DEFER) | 618 | if (PTR_ERR(rockchip->vpcie3v3) != -ENODEV) |
619 | return -EPROBE_DEFER; | 619 | return PTR_ERR(rockchip->vpcie3v3); |
620 | dev_info(dev, "no vpcie3v3 regulator found\n"); | 620 | dev_info(dev, "no vpcie3v3 regulator found\n"); |
621 | } | 621 | } |
622 | 622 | ||
623 | rockchip->vpcie1v8 = devm_regulator_get_optional(dev, "vpcie1v8"); | 623 | rockchip->vpcie1v8 = devm_regulator_get_optional(dev, "vpcie1v8"); |
624 | if (IS_ERR(rockchip->vpcie1v8)) { | 624 | if (IS_ERR(rockchip->vpcie1v8)) { |
625 | if (PTR_ERR(rockchip->vpcie1v8) == -EPROBE_DEFER) | 625 | if (PTR_ERR(rockchip->vpcie1v8) != -ENODEV) |
626 | return -EPROBE_DEFER; | 626 | return PTR_ERR(rockchip->vpcie1v8); |
627 | dev_info(dev, "no vpcie1v8 regulator found\n"); | 627 | dev_info(dev, "no vpcie1v8 regulator found\n"); |
628 | } | 628 | } |
629 | 629 | ||
630 | rockchip->vpcie0v9 = devm_regulator_get_optional(dev, "vpcie0v9"); | 630 | rockchip->vpcie0v9 = devm_regulator_get_optional(dev, "vpcie0v9"); |
631 | if (IS_ERR(rockchip->vpcie0v9)) { | 631 | if (IS_ERR(rockchip->vpcie0v9)) { |
632 | if (PTR_ERR(rockchip->vpcie0v9) == -EPROBE_DEFER) | 632 | if (PTR_ERR(rockchip->vpcie0v9) != -ENODEV) |
633 | return -EPROBE_DEFER; | 633 | return PTR_ERR(rockchip->vpcie0v9); |
634 | dev_info(dev, "no vpcie0v9 regulator found\n"); | 634 | dev_info(dev, "no vpcie0v9 regulator found\n"); |
635 | } | 635 | } |
636 | 636 | ||