From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FD0FC433E2 for ; Tue, 8 Sep 2020 09:39:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18B5021D20 for ; Tue, 8 Sep 2020 09:39:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729132AbgIHJjx (ORCPT ); Tue, 8 Sep 2020 05:39:53 -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-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@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