Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp602431pxp; Wed, 9 Mar 2022 08:56:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLjUWtt7lGiTFJrxhpUOj1ySgnfgfTJ9ao97sdYBoI0lOUEgyJE31YXwCIu69Vhe2xqrOr X-Received: by 2002:a05:6402:254b:b0:412:d172:2607 with SMTP id l11-20020a056402254b00b00412d1722607mr410878edb.80.1646844998376; Wed, 09 Mar 2022 08:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646844998; cv=none; d=google.com; s=arc-20160816; b=VE/6TOhqsJDjs30WuG1odfDWL/dUrnqzI3XwtHcJgyjAfx21lf6fUuU+6CgkEnzzMl fPWub03s+hhMErkb08JZxHgFP5+1CUjmG2YseLi0U4ySDvPZItxFXS2zBKeelvLQzQqd Wk10L6y4G+BofvLqj4E2erWJqx4FD5XCpBkzmum6Fg2KU8T/B7UO1rzKJpQ0mH9QOfqM Pp6O6E6s9igALVz1IJowQa2KoQvSfnmcTvpC9+hlKCVdH2m3jGmOlFcmfNdrEy6s6QOu zkH7EvXzB0MHdNEJcnT0KRqhfL+wJgXbwRuk9sXY6We2PLk5cinnjZTzmsgT80kloe3g BQhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pSmk4sUYJJ0tW7JycQ6lW6OYgIsK9QVxC2+po6YZlJY=; b=UXb2dPFiZKxWxhCPk3sJ1pJPso9hrHn0TC5Ab25wiIxY/XNodUK4SgiNGo/Tucyxk+ 0mrrxZ06CgEsonukYkNh3ficoXOLfQ5BgETF5rXHYLntxLGCUZ8h5iadAXF+R1qyGueI XnuzHh1xtv1vOm2sv+Pf6M7OtmKLAWlc6yfbNxA5QoK4wSsaHGYdoEjTO8KkXsCrVMMm P153lF4Z4MnwbCBaEVTYRyL8jgbLcsAer0bCc2hGpdheHhkV1cCQIUi+X/3ORV9ypn2D G4EmZeMg0JeGRrFw8jr8CnQ8f8BQw/DduqZbgE/Yprc9o01qlkfXV0+BjjpViVsSKA8H 7PIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=FfQS0qjf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc24-20020a1709071c1800b006da825b1354si1796688ejc.766.2022.03.09.08.56.14; Wed, 09 Mar 2022 08:56:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=FfQS0qjf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235627AbiCIQhi (ORCPT + 99 others); Wed, 9 Mar 2022 11:37:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236782AbiCIQaM (ORCPT ); Wed, 9 Mar 2022 11:30:12 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9F59DCE0A; Wed, 9 Mar 2022 08:23:36 -0800 (PST) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1638AE0003; Wed, 9 Mar 2022 16:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1646843011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pSmk4sUYJJ0tW7JycQ6lW6OYgIsK9QVxC2+po6YZlJY=; b=FfQS0qjf7yzl8hGEISX3HfTD2r9xr7ms9Uc6G5EKlNmPyFA0EF/qdInSaW5E990N7XLbWl x2IRKEoEjCyZZ+2pO4u8dIaovbDK0+hPZYrZALz1jHJQWvvxkhED3nsqQrCp+v5BsjP2cH TlbhekPHh8mfcO7Xb4jv2xz/ooQUB0/6DsziSpNCLcwVyuT0sJRQigGBPw5nfoMk9MGV/L j+HBT2+jBSffJkxIYQ0y++YAPhbw0ZWNrzngz8VitAATIFsn+kgIqsiw/gYtW9mJkc0Tvi 0KnyM2BRr7KD4KGEZKJSCFxFyazjVpQKEIDrqih7bx85sHa1rIs1gM9LWGmvnw== From: Alexandre Belloni To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/29] rtc: spear: set range Date: Wed, 9 Mar 2022 17:22:50 +0100 Message-Id: <20220309162301.61679-19-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220309162301.61679-1-alexandre.belloni@bootlin.com> References: <20220309162301.61679-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While the RTC can store dates from year 0000 to 9999, leap years where not tested fro 2100. The driver currently stores tm_year directly which will probably fail at that time or more probably in 2300. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-spear.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index 1b40380aaba2..e386bd714b52 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c @@ -385,6 +385,8 @@ static int spear_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, config); config->rtc->ops = &spear_rtc_ops; + config->rtc->range_min = RTC_TIMESTAMP_BEGIN_0000; + config->rtc->range_min = RTC_TIMESTAMP_END_9999; config->rtc->uie_unsupported = 1; status = devm_rtc_register_device(config->rtc); -- 2.35.1