rtc: rzn1: Handle EPROBE_DEFER for optional pps interrupt
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Fri, 21 Aug 2026 21:10:17 +0000 (22:10 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 23 Aug 2026 19:23:56 +0000 (21:23 +0200)
Check for -EPROBE_DEFER from platform_get_irq_byname_optional() and handle
the deferred probe request properly.

Although the "pps" interrupt is optional, an error code of -EPROBE_DEFER
indicates that the interrupt subsystem is not yet ready. Intercept this
specific error condition, assign it to the return value, and jump to the
dis_runtime_pm label to avoid ignoring a valid probe deferral.

Fixes: eea7791e00f33 ("rtc: rzn1: implement one-second accuracy for alarms")
Cc: stable@vger.kernel.org
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://patch.msgid.link/20260821211032.13554-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-rzn1.c

index c4ed437..f81d691 100644 (file)
@@ -465,6 +465,10 @@ static int rzn1_rtc_probe(struct platform_device *pdev)
        }
 
        irq = platform_get_irq_byname_optional(pdev, "pps");
+       if (irq == -EPROBE_DEFER) {
+               ret = irq;
+               goto dis_runtime_pm;
+       }
        if (irq >= 0)
                ret = devm_request_irq(&pdev->dev, irq, rzn1_rtc_1s_irq, 0, "RZN1 RTC 1s", rtc);