From 62eaf46abc2ad13055af90510946e905be1c79f7 Mon Sep 17 00:00:00 2001 From: Wayne Chang Date: Wed, 15 Oct 2025 11:23:54 +0000 Subject: [PATCH] NVIDIA: SAUCE: usb: xhci: tegra: Use platform_get_irq_optional() for wake IRQs When some wake IRQs are disabled in the device tree, the corresponding interrupt entries are removed from DT. In such cases, the driver currently calls platform_get_irq(), which returns -ENXIO and logs an error like: tegra-xusb a80aa10000.usb: error -ENXIO: IRQ index 9 not found However, not all wake IRQs are mandatory. the hardware can operate normally even if some wake sources are not defined in DT. To avoid this false alarm and allow missing wake IRQs gracefully, use platform_get_irq_optional() instead of platform_get_irq(). Bug 5421820 Change-Id: Ib03b4edb933d481983ec8b9f752ab26004ba4784 Signed-off-by: Wayne Chang Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3470345 Reviewed-by: Jon Hunter Reviewed-by: Brad Griffis GVS: buildbot_gerritrpt --- drivers/usb/host/xhci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index 90fa634438b2..639aa8efd54c 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -2191,7 +2191,7 @@ static int tegra_xusb_setup_wakeup(struct platform_device *pdev, struct tegra_xu for (i = 0; i < tegra->soc->max_num_wakes; i++) { struct irq_data *data; - tegra->wake_irqs[i] = platform_get_irq(pdev, i + WAKE_IRQ_START_INDEX); + tegra->wake_irqs[i] = platform_get_irq_optional(pdev, i + WAKE_IRQ_START_INDEX); if (tegra->wake_irqs[i] < 0) break;