Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1118776yba; Tue, 2 Apr 2019 02:41:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuWDxIamHts51AmEk4dPylWPqTaPaW1PRfkI0d38avgv6FrZxMAciL5AhMBNE/kkw9k1Di X-Received: by 2002:a63:5b0a:: with SMTP id p10mr11749071pgb.282.1554198097688; Tue, 02 Apr 2019 02:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554198097; cv=none; d=google.com; s=arc-20160816; b=J7q/lm8wtW5LddFG7T5hFEB7APauYnYRrRrx78d4GTnqE+wAgZcyboseYijm5CrgiA XHwI6sTcMv+GKw5dGsAyP2LT3126FKkjoFHZfkFu+8cu+oNcTLtbYIOJAdwduhSErLtg e9xsHdhD/yJ01Db6I8IPfVApV9e2asItNZ0tUZaqpjDxP/ETP1nmV2nuojod8DTRyFP7 RomxQAYOSBccPPiF1L4rcWv32tScbZQC7O0wE8v3w09EosMKwF6ayO79NNSJ0TUH7zfy d/+f84NYtWz8eGvSN5yjRq0LMio1BaZrxfA9ODfn8+XqVAzvgGyEvsEuHTiFsZ8LAiO2 IC/w== 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=MQwU0t5UiEoCXW+v5PB9lhlkRH15DK8m+2ePvxapV+Y=; b=hytcKy2lj7DByBaa3NYc1APuD4s4l66bBkgl/TmDXV8uS/DGmZo9wdfpj0hWNvJGg+ /BdfFQcWQDmjzkupg4vlwew0KTrfpAAX7PTMOFvk8xzbXneKVCWoeA3iA+NlpYMWe24r PwNufux9y4a27Gr9VzP8nzx4wiO+BJYB/jJh6lBlP2tzZwu8sJNOM9APpLJ9dMIzmCEz sKIcmi1SxPVj/BFe0r6p7fQPPUtDrpOFFkHSiLOxzx1wh+saL2un/+RW5FzBEre1Gwsh Yb4CKwsdJAXEC4R5DNF7vF/65RNLLbEYTWnGPxBAZbQUN3TZgRAQmRMRA/uT6yes7X7o Y2ng== 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 r190si11238517pfc.14.2019.04.02.02.41.22; Tue, 02 Apr 2019 02:41:37 -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 S1729682AbfDBJeD (ORCPT + 99 others); Tue, 2 Apr 2019 05:34:03 -0400 Received: from sauhun.de ([88.99.104.3]:38402 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726284AbfDBJeD (ORCPT ); Tue, 2 Apr 2019 05:34:03 -0400 Received: from localhost (p5486CD10.dip0.t-ipconnect.de [84.134.205.16]) by pokefinder.org (Postfix) with ESMTPSA id 24F252CF606; Tue, 2 Apr 2019 11:34:00 +0200 (CEST) Date: Tue, 2 Apr 2019 11:33:59 +0200 From: Wolfram Sang To: Alexandre Belloni 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: <20190402093359.GB2960@kunai> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="i0/AhcQY5QxfSsSZ" Content-Disposition: inline In-Reply-To: <20190402085325.GT3430@piout.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --i0/AhcQY5QxfSsSZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Alexandre, > I had a look at the driver and I guess you have a 9063AD while Steve > uses another model. >=20 > 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: >=20 > =3D=3D=3D >=20 > 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 >=20 > The DA9063AD doesn't support alarms on any seconds and its granularity is > the minute. Set uie_unsupported in that case. >=20 > 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(+) >=20 > 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 *p= dev) > da9063_data_to_tm(data, &rtc->alarm_time, rtc); > rtc->rtc_sync =3D false; > =20 > + if (config->rtc_data_start !=3D RTC_SEC) > + rtc->rtc_dev->uie_unsupported =3D 1; > + I think we should have a comment here, like: /* FIXME: Make use of the TICK interrupt once the RTC core supports it */ 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 --i0/AhcQY5QxfSsSZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlyjLIMACgkQFA3kzBSg KbakIhAAgNdylqV8UUYc8TwyiFxpv7BBiF7M+7q2VYl6IiaPLn6vEh/kGrvR4Kc4 N5gjinPwaBKhFSTRd3rKKI7qOMHe+vKSLrshdXD55F8/mnWo7zuJnI0SadBYFPW2 cWNaY8ef74DjmuoCexhi6/62JHsvV14SbrASiC7/U5YKC7AyGzCI6Zd81h7jvPky kV//ToGUVP+ok+3ikVWi+ZfFoy5ObeFm0+aYIfXcCBXwCHKgvZVut/WBG6S4Frpw 2UT/TgYFHuJzFcXLmLH53Zpn9X4KMEoAkOLlVS+Rd8bm2VT6WagbvjE3FicwI68j 4Ej2oJQ8xwXfc6jbWB3uVgnwaqXRzIQDbHlUq+S9M3Hr7XEOQF+RIzRGu8vNLS7W eCx/boTViJ1AiaiJm8wJlZL/OzrYFA9a6GXC9/upO6UzJPgwxiGh1YA32pJ9IE/R CVK0sR4ZZnzFPBSgEIwWXT0VuZqN1+DUzBvbkJepYXyENAuNxKXxa4jLgfvXcMCd xILLYZiWNNO3Gx0XKdR0CJafsjZcy3nYN/IatXN3qMCmIwGOzOXkqYbHj6XJ5HIM smmFT9NhLCaaur2VetDts2KUUWBj4nrmnhqid1YqXJzkmtRdrrza3feZdlRf2S1u vJbIq8poUVb1xxHpyAcnjN1CR44AOiOAzGETJpcMMk0uszZu7RU= =prjQ -----END PGP SIGNATURE----- --i0/AhcQY5QxfSsSZ--