Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3795331pxk; Tue, 8 Sep 2020 02:42:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkr91J35LHgSEqK1qNfE3WhcDMKmLlw69TNzyhmUX1d22aUAZhfQEyLw3jx0J4p1UwALxm X-Received: by 2002:a50:da44:: with SMTP id a4mr26752930edk.36.1599558154414; Tue, 08 Sep 2020 02:42:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599558154; cv=none; d=google.com; s=arc-20160816; b=k/PEA4VfXrXv5BqOm+dB/ytdxlMxoKV/ZfHP3eFZGUTEBZ/erLi2HBVVLuQqdN4FOt aJxBXjUmSkPNKCAGCnBWl7uraQK4xXvFniUYIqJ4sqVnA4EPg+b/E8fBHkddzseBuRR1 zgZkC2wMmzWIhf99vDeGEv/RT/E7wgHim4OykCsDJQrIOzdcYiMWJBwROE2Z2APqXT5N aGetzh77KhFamvezGDY1bbOORovr1UXnwMUvKaY8ExMiUsOtPMX7ecyx/m3wCwzrSCg8 YcBDYdXsV6yNHJErHNxQxl6U/ZmP/KqfEE1dMxrqpeyvUBoIawOpuY7o6KVdsVmjZ9Y6 oOXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=g13SSUW9hWuDpuVKfFvSS2Sks3YAGEWu7wfAZjyiweg=; b=lxiqPuvzHW+G40kHMtjuHMrd20PLknbj2XlORUTP/T/3QhF1UipzjP8Os0ru2RggcY I4xGu8SpDEVaTruAs77MHxWwFU4CwS+DkJYInXQSuWwQXeqZTuNLZ9/AptnGAf5Y7gb2 Khl2W1biXiDk7v66bVxn8oJmuhXRueh8eS7tPHAxZxMTpynZ3vQZQql/9Jn0rlWuDzoA kXq3xDdMmMkF185sM2ih9YDmjckQFOslU/1W49/KDXI3jatgfBIkLdqALs/h99tdQJC/ /YNHTPu0c/YCmsRBl1PMKPwktEgfO6BsQbWWMlXWFwlVrREu5UuXvQwLZ1Micbf8pYra py9A== 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 d27si10193896ejd.549.2020.09.08.02.42.12; Tue, 08 Sep 2020 02:42:34 -0700 (PDT) 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 S1729150AbgIHJjy (ORCPT + 99 others); Tue, 8 Sep 2020 05:39:54 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:51895 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728886AbgIHJjx (ORCPT ); Tue, 8 Sep 2020 05:39:53 -0400 X-Originating-IP: 90.66.108.79 Received: from localhost (lfbn-lyo-1-1932-79.w90-66.abo.wanadoo.fr [90.66.108.79]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 0E8EA24000F; Tue, 8 Sep 2020 09:39:46 +0000 (UTC) Date: Tue, 8 Sep 2020 11:39:46 +0200 From: Alexandre Belloni To: Jonathan =?iso-8859-1?Q?Neusch=E4fer?= Cc: linux-kernel@vger.kernel.org, Lee Jones , Rob Herring , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Alessandro Zummo , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade , Arnd Bergmann , Daniel Palmer Subject: Re: [PATCH v2 07/10] rtc: Introduce RTC_TIMESTAMP_END_2255 Message-ID: <20200908093946.GQ230586@piout.net> References: <20200905133230.1014581-1-j.neuschaefer@gmx.net> <20200905133230.1014581-8-j.neuschaefer@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200905133230.1014581-8-j.neuschaefer@gmx.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/09/2020 15:32:27+0200, Jonathan Neusch?fer wrote: > Some RTCs store the year as an 8-bit number relative to the year 2000. > This results in a maximum timestamp of 2255-12-31 23:59:59. > > Signed-off-by: Jonathan Neusch?fer > --- > > v2: > - New patch > --- > include/linux/rtc.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/rtc.h b/include/linux/rtc.h > index 22d1575e4991b..fcc086084a603 100644 > --- a/include/linux/rtc.h > +++ b/include/linux/rtc.h > @@ -154,6 +154,7 @@ struct rtc_device { > #define RTC_TIMESTAMP_END_2079 3471292799LL /* 2079-12-31 23:59:59 */ > #define RTC_TIMESTAMP_END_2099 4102444799LL /* 2099-12-31 23:59:59 */ > #define RTC_TIMESTAMP_END_2199 7258118399LL /* 2199-12-31 23:59:59 */ > +#define RTC_TIMESTAMP_END_2255 9025257599LL /* 2255-12-31 23:59:59 */ Honestly, I wouldn't bother adding that one unless you have examples of other RTCs endng at the same date, I'm fine having the value and comment directly in the probe function. > #define RTC_TIMESTAMP_END_9999 253402300799LL /* 9999-12-31 23:59:59 */ > > extern struct rtc_device *devm_rtc_device_register(struct device *dev, > -- > 2.28.0 > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com