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=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 20F10C47404 for ; Mon, 7 Oct 2019 13:47:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF95A20867 for ; Mon, 7 Oct 2019 13:47:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728460AbfJGNrk (ORCPT ); Mon, 7 Oct 2019 09:47:40 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:42101 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728238AbfJGNre (ORCPT ); Mon, 7 Oct 2019 09:47:34 -0400 X-Originating-IP: 86.207.98.53 Received: from localhost (aclermont-ferrand-651-1-259-53.w86-207.abo.wanadoo.fr [86.207.98.53]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 19E221BF214; Mon, 7 Oct 2019 13:47:33 +0000 (UTC) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH 07/10] rtc: ds1347: set range Date: Mon, 7 Oct 2019 15:47:21 +0200 Message-Id: <20191007134724.15505-7-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191007134724.15505-1-alexandre.belloni@bootlin.com> References: <20191007134724.15505-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DS1347 handle dates from year 0000 to 9999. Leap years are claimed to be handled correctly in the datasheet. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1347.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c index 75c522c8ab26..22a75b01f1ac 100644 --- a/drivers/rtc/rtc-ds1347.c +++ b/drivers/rtc/rtc-ds1347.c @@ -134,6 +134,8 @@ static int ds1347_probe(struct spi_device *spi) return PTR_ERR(rtc); rtc->ops = &ds1347_rtc_ops; + rtc->range_min = RTC_TIMESTAMP_BEGIN_0000; + rtc->range_max = RTC_TIMESTAMP_END_9999; return rtc_register_device(rtc); } -- 2.21.0