Skip to content

Commit 5cc9525

Browse files
Prathamesh Shetelinusw
authored andcommitted
gpio: tegra186: Check PMC driver status before any request
When the PMC device is disabled, probing of the Tegra186 GPIO driver fails because the IRQ domain that is registered by the PMC driver is not found. The PMC IRQ domain is only used for wake-up and does not impact GPIO functionality in general. Therefore, if the PMC device is disabled, skip looking up the PMC IRQ domain to allow the GPIO driver to be probed. Signed-off-by: Manish Bhardwaj <[email protected]> Signed-off-by: Prathamesh Shete <[email protected]> Reviewed-by: Jon Hunter <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 6d8257c commit 5cc9525

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

drivers/gpio/gpio-tegra186.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -894,11 +894,15 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
894894

895895
np = of_find_matching_node(NULL, tegra186_pmc_of_match);
896896
if (np) {
897-
irq->parent_domain = irq_find_host(np);
898-
of_node_put(np);
899-
900-
if (!irq->parent_domain)
901-
return -EPROBE_DEFER;
897+
if (of_device_is_available(np)) {
898+
irq->parent_domain = irq_find_host(np);
899+
of_node_put(np);
900+
901+
if (!irq->parent_domain)
902+
return -EPROBE_DEFER;
903+
} else {
904+
of_node_put(np);
905+
}
902906
}
903907

904908
irq->map = devm_kcalloc(&pdev->dev, gpio->gpio.ngpio,

0 commit comments

Comments
 (0)