[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YEnblWV1VWJJHtyv@piout.net>
Date: Thu, 11 Mar 2021 09:57:57 +0100
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Corentin Labbe <clabbe.montjoie@...il.com>
Cc: a.zummo@...ertech.it, linux-rtc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: rtc: rtc-m48t59: rtc-m48t59.0: IRQ index 0 not found
Hello,
On 10/03/2021 10:53:34+0100, Corentin Labbe wrote:
> 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)
This is due to 7723f4c5ecdb8d832f049f8483beb0d1081cedf6
Can you try that?
>From 55cc33fab5ac9f7e2a97aa7c564e8b35355886d5 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
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.
Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>
---
drivers/rtc/rtc-m48t59.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index 1d2e99a70fce..f0f6b9b6daec 100644
--- a/drivers/rtc/rtc-m48t59.c
+++ b/drivers/rtc/rtc-m48t59.c
@@ -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;
--
2.29.2
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists