Skip to content

Commit

Permalink
Merge branch 'remotes/lorenzo/pci/kirin'
Browse files Browse the repository at this point in the history
- Return -EPROBE_DEFER in case the gpio isn't ready (Bean Huo)

* remotes/lorenzo/pci/kirin:
  PCI: kirin: Return -EPROBE_DEFER in case the gpio isn't ready
  • Loading branch information
bjorn-helgaas committed Oct 21, 2020
2 parents 7ba381c + ecc3e42 commit 29828fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/pci/controller/dwc/pcie-kirin.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,12 @@ static int kirin_pcie_probe(struct platform_device *pdev)

kirin_pcie->gpio_id_reset = of_get_named_gpio(dev->of_node,
"reset-gpios", 0);
if (kirin_pcie->gpio_id_reset < 0)
if (kirin_pcie->gpio_id_reset == -EPROBE_DEFER) {
return -EPROBE_DEFER;
} else if (!gpio_is_valid(kirin_pcie->gpio_id_reset)) {
dev_err(dev, "unable to get a valid gpio pin\n");
return -ENODEV;
}

ret = kirin_pcie_power_on(kirin_pcie);
if (ret)
Expand Down

0 comments on commit 29828fc

Please sign in to comment.