public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: tegra186: Check PMC driver status before any request
@ 2023-06-06  7:17 Prathamesh Shete
  2023-06-06  8:53 ` Jon Hunter
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Prathamesh Shete @ 2023-06-06  7:17 UTC (permalink / raw)
  To: linus.walleij, brgl, thierry.reding, jonathanh, linux-tegra,
	linux-gpio, linux-kernel
  Cc: smangipudi, pshete, Manish Bhardwaj

This patch fixes the issue where even if PMC driver status is
disabled still we are trying to look up for the IRQ domain
that PMC driver would've registered if it had been enabled.

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
---
 drivers/gpio/gpio-tegra186.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
index 464b0ea3b6f1..80d08ddde40e 100644
--- a/drivers/gpio/gpio-tegra186.c
+++ b/drivers/gpio/gpio-tegra186.c
@@ -964,11 +964,15 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
 
 	np = of_find_matching_node(NULL, tegra186_pmc_of_match);
 	if (np) {
-		irq->parent_domain = irq_find_host(np);
-		of_node_put(np);
-
-		if (!irq->parent_domain)
-			return -EPROBE_DEFER;
+		if (of_device_is_available(np)) {
+			irq->parent_domain = irq_find_host(np);
+			of_node_put(np);
+
+			if (!irq->parent_domain)
+				return -EPROBE_DEFER;
+		} else {
+			of_node_put(np);
+		}
 	}
 
 	irq->map = devm_kcalloc(&pdev->dev, gpio->gpio.ngpio,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] gpio: tegra186: Check PMC driver status before any request
@ 2022-09-12 13:33 Prathamesh Shete
  2022-10-24 14:02 ` Thierry Reding
  0 siblings, 1 reply; 10+ messages in thread
From: Prathamesh Shete @ 2022-09-12 13:33 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski, linux-gpio, linux-tegra,
	linux-kernel, jonathanh, thierry.reding
  Cc: smangipudi, pshete, Manish Bhardwaj

This patch fixes the issue where even if pmc driver
status is disabled still we are invoking pmc driver
to process some request

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
---
 drivers/gpio/gpio-tegra186.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
index 54d9fa7da9c1..efd508ba07a6 100644
--- a/drivers/gpio/gpio-tegra186.c
+++ b/drivers/gpio/gpio-tegra186.c
@@ -895,7 +895,7 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
 		tegra186_gpio_init_route_mapping(gpio);
 
 	np = of_find_matching_node(NULL, tegra186_pmc_of_match);
-	if (np) {
+	if (of_device_is_available(np)) {
 		irq->parent_domain = irq_find_host(np);
 		of_node_put(np);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-09  7:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06  7:17 [PATCH] gpio: tegra186: Check PMC driver status before any request Prathamesh Shete
2023-06-06  8:53 ` Jon Hunter
2023-06-07 10:55   ` Jon Hunter
2023-06-07 11:31     ` [PATCH v2] " Prathamesh Shete
2023-06-07 11:46       ` Jon Hunter
2023-06-08 16:02       ` Thierry Reding
2023-06-06  9:48 ` [PATCH] " andy.shevchenko
2023-06-09  7:18 ` Linus Walleij
  -- strict thread matches above, loose matches on Subject: below --
2022-09-12 13:33 Prathamesh Shete
2022-10-24 14:02 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox