Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp184011pxf; Thu, 11 Mar 2021 01:01:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoPpMK64YGkVN7ZcmFa/1lfUvdUrCA/egENV7QzOOMt3A9MWnjia9zJkTsTwijNlV/cFKt X-Received: by 2002:a05:6402:3049:: with SMTP id bu9mr7617124edb.104.1615453293002; Thu, 11 Mar 2021 01:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615453292; cv=none; d=google.com; s=arc-20160816; b=1El0WBlt4A108vqq3hzkxSZMPucciw7mHSP6fKUaf0mjCzCTYZ/cW1ft0cB1AzU9x7 1LNVyChBlXcjk196Q8m7EF+mx19LgujKvKplYUWZDM3EOiGejpjFG/lvVKuQzWAvK1LD EAO+5Q3i2kdCDBcJgw4P2GEpzFGIHv2hUc+VNuLCy/JofWV/fuTkNT2GxWfB+74+Xfm+ En+GPLjozbPWW4Ctoyr4Fzs8iTC2fR8UxicWWtxujHI0189wnxBhl/5X7SOrKojXfRnN j+sfnOvAN0fopmqtD8Xi9KpppovbqrGsZeZ6kDwi3gwi65oTlZiQwsrVK7uCiMAr6TmW 9+0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=8Sxn6GULvh1sEYUAj7m+80XmUFAWGwmqwgWv1qB1CXs=; b=nAk6f1UIC5juj0zgwXky6kmQ09M+argfTEVtga6ZOGew3je0mNT30gaoGqilgK+Yms YCH8vVeH8vntL6POcThxiW4X0e3jZ7Ki+eUdn+0NhmWJf6DpwmSMgZb7c7FwvKc4A1Yk 17/cSXxeUSi1tGDVipBcC2ao7CbwfSOZRqq2Pi9iEp/kdUHkpi/bi4i7SmksTWb8ecvR QQ6kz6CBa6xVUt2A1tb3o+1Sb1vyHEk9F+YJshLJLCZr0iRdWqpgI1jMoKlim71r+99R mTPYLuykxMCjH5CBpx5bCE+8a8cxLMVKmdGD6gzvX27zENRghHVx9mtJUQi8t8yQJLTo +f1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si1418743edx.470.2021.03.11.01.01.10; Thu, 11 Mar 2021 01:01:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231683AbhCKI6T (ORCPT + 99 others); Thu, 11 Mar 2021 03:58:19 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:44041 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230290AbhCKI57 (ORCPT ); Thu, 11 Mar 2021 03:57:59 -0500 X-Originating-IP: 90.65.108.55 Received: from localhost (lfbn-lyo-1-1676-55.w90-65.abo.wanadoo.fr [90.65.108.55]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 552F91BF21D; Thu, 11 Mar 2021 08:57:57 +0000 (UTC) Date: Thu, 11 Mar 2021 09:57:57 +0100 From: Alexandre Belloni To: Corentin Labbe Cc: a.zummo@towertech.it, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: rtc: rtc-m48t59: rtc-m48t59.0: IRQ index 0 not found Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 --- 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