rtc: rtc-m48t59: rtc-m48t59.0: IRQ index 0 not found
Hello
On my SPARC sunblade 100, I got this:
[ 13.613727] rtc-m48t59 rtc-m48t59.0: IRQ index 0 not found [ 13.805777] rtc-m48t59 rtc-m48t59.0: registered as rtc0 [ 14.385092] rtc-m48t59 rtc-m48t59.0: setting system clock to 2021-03-01T05:34:33 UTC (1614576873)
The IRQ index 0 message is found after 5.5
Testing rtc via hwclock give:
hwclock: ioctl(3, RTC_UIE_ON, 0) to /dev/rtc0 failed: Input/output error
But this hwclock behavior is present also on earlier kernel (tested 4.9.260, 4.19.179 and 4.14.224).
Does this Input/output error is normal ? (I think no)
Regards
Alexandre Belloni
maintainerHello,
Quoted 7 lines · Corentin Labbe
Hello
On my SPARC sunblade 100, I got this:
[ 13.613727] rtc-m48t59 rtc-m48t59.0: IRQ index 0 not found [ 13.805777] rtc-m48t59 rtc-m48t59.0: registered as rtc0 [ 14.385092] rtc-m48t59 rtc-m48t59.0: setting system clock to 2021-03-01T05:34:33 UTC (1614576873)
Quoted 7 lines
The IRQ index 0 message is found after 5.5
Testing rtc via hwclock give:
hwclock:ioctl(3, RTC_UIE_ON, 0)to/dev/rtc0failed: Input/output error
But this hwclock behavior is present also on earlier kernel (tested 4.9.260, 4.19.179 and 4.14.224).Does this Input/output error is normal ? (I think no)
This is due to 7723f4c5ecdb8d832f049f8483beb0d1081cedf6
Can you try that?
From 55cc33fab5ac9f7e2a97aa7c564e8b35355886d5 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <[email protected]>
Date: Thu, 11 Mar 2021 09:48:09 +0100
Subject: [PATCH] rtc: m48t59: use platform_get_irq_optional
The IRQ is optional, avoid the error message by using platform_get_irq_optional.
--- drivers/rtc/rtc-m48t59.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-m48t59.c +1 -1
@@ -421,7 +421,7 @@ static int m48t59_rtc_probe(struct platform_device *pdev)/* Try to get irq number. We also can work in * the mode without IRQ. */ - m48t59->irq =platform_get_irq (pdev,0 ); + m48t59->irq =platform_get_irq_optional (pdev,0 );if (m48t59->irq <=0 ) m48t59->irq =NO_IRQ ;
Signature · 6 lines
2.29.2 -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com