Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1126132yba; Tue, 2 Apr 2019 02:52:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQv+yhoxpHz9nbQxmn6z0jDCQ1NP2vHXe7A9zjhTNRCb/D943H0TOrp3QvG9B+HDRwLw35 X-Received: by 2002:a65:4844:: with SMTP id i4mr64204835pgs.347.1554198763673; Tue, 02 Apr 2019 02:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554198763; cv=none; d=google.com; s=arc-20160816; b=0DvsLVr4qIzCv2OGqr3BkiWFNLRn8qv6EwCcGuxQ9yIBp/iFlnxLdURiSTT3xIE2xO Cf6EKluLl5TzEqj2E8YUBWCiaqfyALcLR8W4FSAx2q3AroSjpJS2uCqvD07CaIXU0KIS r4Mly4yVIKhiy2Ifvka1kXYOENkKhrV5n4+wq2Rehic3Y6Acek+ZyvyBv2cHTgHDeGi+ UiXaNr4zHGy39kd4CjE449F6f/Tci7UUMS5+nTc/dR0PWnOcX4pfgbcX92ZozI1p8knY YcYoqHk2fWcjAmtrtcGd4BBiTbpjKnXRxgkKmqqGQ2tSRBOrp1W8KJr8/+/bhgQYTqhV 9BJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zTjQ/5oMMHld+jKPsb/9mmjYI2BIY2szFWi9JdZdswY=; b=SbsWIHUivrhMrmKahtik3PrFbGSlWBJqhc8d84dGBPoKxp9fOo6jy3SBFgD5RRcZZM BFJ8o7PWPlRbfHAd0iQ81zF8yneJ1KSPz26jRit1YUaMHTVQ8Yp+bFnbeCBUA69FhN7d GFEi3riHI5YUy75nNsFctQPEOMdYRBvcT6TX31XfeFLfVAazc79iWr44wgFr+d1NN2Sy glCvM3pkqULr9bbWrxk9GkVDmQJ2MFYLQmppB+5r8NZxfST1bNcCZdf96Sj0VF91yCRK zCxj5XdchbeR8nlVgZC9QQoFs19PpnRXV3wa+m4OgtcSsnlUi78BmUH9GJnTm+Z4G2f9 AW0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 195si10538519pgc.279.2019.04.02.02.52.28; Tue, 02 Apr 2019 02:52:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729799AbfDBJvT (ORCPT + 99 others); Tue, 2 Apr 2019 05:51:19 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:39269 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729004AbfDBJvT (ORCPT ); Tue, 2 Apr 2019 05:51:19 -0400 X-Originating-IP: 109.213.83.19 Received: from localhost (alyon-652-1-60-19.w109-213.abo.wanadoo.fr [109.213.83.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 64EC32000D; Tue, 2 Apr 2019 09:51:16 +0000 (UTC) Date: Tue, 2 Apr 2019 11:51:15 +0200 From: Alexandre Belloni To: Wolfram Sang Cc: Geert Uytterhoeven , Steve Twiss , "linux-rtc@vger.kernel.org" , Linux Kernel Mailing List , Wolfram Sang , Support Opensource , Linux-Renesas Subject: Re: [PATCH 1/2] rtc: da9063: set range Message-ID: <20190402095115.GW3430@piout.net> References: <20190401132109.GA4570@kunai> <20190401150741.vwqzzngnma4jvkid@ninjato> <20190401151628.GK3430@piout.net> <20190401155204.GA5964@kunai> <20190401185346.GP3430@piout.net> <20190401193424.sqnapthocznhjqok@ninjato> <20190402085325.GT3430@piout.net> <20190402093359.GB2960@kunai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190402093359.GB2960@kunai> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/04/2019 11:33:59+0200, Wolfram Sang wrote: > Hi Alexandre, > > > I had a look at the driver and I guess you have a 9063AD while Steve > > uses another model. > > > > That explains why you need the uie_unsupported flag. The 9063AD can only > > do alarms on a minute boundary. > > Bingo! Nice catch. I was on the wrong track because we have an early > boot quirk handling for the DA on this platform and I was searching > there for side effects. Makes all sense now. Thanks a lot for your help! > > > Since the move to hr_timer, the uie are done using the classic alarm or > > they are emulated by the core. This improved the situation for many RTCs > > that don't have a separate UIE but this made it worse for a few (and > > this is an example). I have plan to work on this but didn't have the > > time yet. > > I understand. That explains why my RTC knowledge from a few years ago > feels so outdated :) > > > I suggest the following patch: > > > > === > > > > From 37b2ab7d537e76e42bde64cf4b57701b0ed8e8cd Mon Sep 17 00:00:00 2001 > > From: Alexandre Belloni > > Date: Tue, 2 Apr 2019 10:06:46 +0200 > > Subject: [PATCH] rtc: da9063: set uie_unsupported when relevant > > > > The DA9063AD doesn't support alarms on any seconds and its granularity is > > the minute. Set uie_unsupported in that case. > > > > Reported-by: Wolfram Sang > > Please use this address: > > Reported-by: Wolfram Sang > > > Reported-by: Geert Uytterhoeven > > And probably Geert wants his "+renesas" address, too: > > Geert Uytterhoeven > > > Signed-off-by: Alexandre Belloni > > --- > > drivers/rtc/rtc-da9063.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c > > index 1b792bcea3c7..53e690b0f3a2 100644 > > --- a/drivers/rtc/rtc-da9063.c > > +++ b/drivers/rtc/rtc-da9063.c > > @@ -475,6 +475,9 @@ static int da9063_rtc_probe(struct platform_device *pdev) > > da9063_data_to_tm(data, &rtc->alarm_time, rtc); > > rtc->rtc_sync = false; > > > > + if (config->rtc_data_start != RTC_SEC) > > + rtc->rtc_dev->uie_unsupported = 1; > > + > > I think we should have a comment here, like: > > /* FIXME: Make use of the TICK interrupt once the RTC core supports it */ > Well, My plan is to go over all the uie_unsupported users once the infrastructure is in place but I'll put a comment there. > So, this helps the UIE test: > > Reviewed-by: Wolfram Sang > Tested-by: Wolfram Sang > > And I guess we have to live with two of the alarm tests failing because > of the minute granularity? > > Regards, > > Wolfram > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com