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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EF63C4332F for ; Thu, 21 Oct 2021 20:55:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CBFB61037 for ; Thu, 21 Oct 2021 20:55:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232072AbhJUU5W (ORCPT ); Thu, 21 Oct 2021 16:57:22 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:46149 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbhJUU5U (ORCPT ); Thu, 21 Oct 2021 16:57:20 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id E2C0E20004; Thu, 21 Oct 2021 20:55:02 +0000 (UTC) Date: Thu, 21 Oct 2021 22:55:02 +0200 From: Alexandre Belloni To: Sam Protsenko Cc: Krzysztof Kozlowski , Alessandro Zummo , linux-rtc@vger.kernel.org, Linux Samsung SOC , Linux Kernel Mailing List Subject: Re: [PATCH 2/4] rtc: s3c: Add time range Message-ID: References: <20211019131724.3109-1-semen.protsenko@linaro.org> <20211019131724.3109-3-semen.protsenko@linaro.org> <6dbd4812-bac3-55dc-108e-c322e8a493de@canonical.com> <6ce55971-bee5-1bc9-c3a2-28e6ede37401@canonical.com> 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 On 21/10/2021 22:48:51+0300, Sam Protsenko wrote: > After testing thoroughly, I can confirm that Alexandre is right about > leap years (Exynos850 RTC treats both 2000 and 2100 as leap years). > And it also overflows internally on 2159 year, limiting the actual > time range at 160 years. So I'll keep that range at 100 years for all > RTCs. As Krzysztof said, there is no practical reasons in trying to > increase it anyway. Will send v2 soon. > > What I'm curious about is RTC testing. I've found this test suite: > > tools/testing/selftests/rtc/rtctest.c > > But it doesn't seem to cover corner cases (like checking leap years, > which was discussed here). Just a thought: maybe it should be added > there, so everyone can benefit from that? For example, I know that in > Linaro we are running LKFT tests for different boards, so that might > theoretically reveal some bugs. Though I understand possible > implications: we probably don't know which ranges are supported in > driver that's being tested. Anyway, just saying. > Sorry, I should have pointed to: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/rtc-tools.git/tree/rtc-range.c This does check for the actual range of an RTC. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com