Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp432495rdb; Sat, 19 Aug 2023 07:31:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESu5YrVs4HLi4/xeUC/dNceLsLPxVVqrs91c0ToIh078iYsGdlLqJPZoWwZFbc6tZ9L8p0 X-Received: by 2002:a17:903:1d2:b0:1bc:496c:8edb with SMTP id e18-20020a17090301d200b001bc496c8edbmr2684277plh.0.1692455518053; Sat, 19 Aug 2023 07:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692455518; cv=none; d=google.com; s=arc-20160816; b=Iwb8Xha7swOP2pYRsjf+kffD2DRB7lrMKWETk526Qhdj0uSQAcxuhITbYFCyKq8EPI S16vAq5RETh/mgYi1yr3IjWHbEl1AC2Wa4kj5ul+1nsbr4cEaF8ZRX4pIeyl33p7AUfC YZnjSgPkXobWUi0AtjmfaxvmZgRLn60TuNYaVYE/bcHCHgCJYmfoFCSbY9+VEThbgxTS V1zFkUtvDJA6DuPO5z9iLq79NKOPxDpytbXP1pnTRcU5vkv2Gygbanv60sHEWfamyy8j Ur6C5XeN5MIZoW8BV3x6O2D59J6U7x9bPRIYQuu5006bBdQyl0Xm6BBhev1wuralRJtl QI+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wHKQb0SmxhWjxqmZQ9159wjV4k0plINo8JRIiEa3nHs=; fh=61Ziv4BRhuuZg3gVso0KJ0Hur0djeuKyud2ykBUU/2M=; b=UgYOMLc0pjPkXyZ60sPKio9Ziixh0MBhj7qIAn8dVg52eblcmbFYjrFitm5grWuZc6 GdXByLz8qc0EakeVqs9w1qNX6WpnBr7kpxLFWi+r6L6XcA9q489astW5gUFr+9Ho6GPL SwbBaj4vz7BeSvkMZBc9P8c+pvdmOeiq21IG9y8/leh2zCGDoLiKTYP1pb1gZZREZxc8 oh71sNY+4ql7t+BFZkLeu1uFwk+YoCCbj5kUqNcajg0+GzFSaj2q92JiLrQ7uv+zPlF7 luEUdgxGlJmn6X1/XniKZDqPmUJiE/SC/VvtfrX4WkkkUjsJSMN8DEVSF0Ux6dLcglnj SF+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JFPt83Ku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s3-20020a170902ea0300b001bb3bcd05bbsi3695364plg.471.2023.08.19.07.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Aug 2023 07:31:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JFPt83Ku; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D8646C6E4F; Sat, 19 Aug 2023 01:44:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354706AbjHQTvd (ORCPT + 99 others); Thu, 17 Aug 2023 15:51:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354798AbjHQTvX (ORCPT ); Thu, 17 Aug 2023 15:51:23 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F390EE; Thu, 17 Aug 2023 12:51:20 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7994040002; Thu, 17 Aug 2023 19:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1692301879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wHKQb0SmxhWjxqmZQ9159wjV4k0plINo8JRIiEa3nHs=; b=JFPt83KuEKi5EXmtWYJ2Sj7oMl1X5lfc9+Ygp6fKL3/vVgjC5kdazP6TM8ysUERLH4ekbF 0Q266DWhwlmpstyDcBN9FE+sDXwSSps0+iEOHwdjyHbZsxd3h1G0yrzRml1UewEvK9SKPn iaHl8D1N9pS6SSIrqQGA8hqKQChHemJhNb6MtD+8ZGq6J52dy0BgIyQIphHMqidrp6rT7L +Gb/q9828ysKQfq8Q5ab/sJIZ+xWd4lU7VGI46BDWL0TBGsUJeOXKb+FfPIYBYBEpB2aCc W3XyWrNnHl0p7CavaGgILZIoN7SgI+neNSLmzXVRs9/1Zyb5fE3QUVP4vmlFnw== Date: Thu, 17 Aug 2023 21:51:17 +0200 From: Alexandre Belloni To: Guenter Roeck Cc: Alessandro Zummo , Benson Leung , Miquel Raynal , Thomas Gleixner , John Stultz , Stephen Boyd , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris Subject: Re: [PATCH 0/7] rtc: Add support for limited alarm timer offsets Message-ID: <202308171951177626a54c@mail.local> References: <20230816133936.2150294-1-linux@roeck-us.net> <20230816150353137debc5@mail.local> <8079bdf4-f790-451b-a2c2-be4e23c0c3a1@roeck-us.net> <20230816161435bd2bbd4a@mail.local> <6ffc915e-ca91-4b64-b7a5-f13f60df8b1d@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ffc915e-ca91-4b64-b7a5-f13f60df8b1d@roeck-us.net> X-GND-Sasl: alexandre.belloni@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS 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 On 16/08/2023 12:12:14-0700, Guenter Roeck wrote: > On Wed, Aug 16, 2023 at 06:14:35PM +0200, Alexandre Belloni wrote: > > On 16/08/2023 08:50:12-0700, Guenter Roeck wrote: > > > > I'm fine with the series, however, this doesn't solve the issue for RTCs > > > > that have an absolute limit on the alarm (as opposed to an offset to the > > > > current time/date). > > > > > > > > > > I thought that is checked by rtc_valid_range() in rtc_set_alarm(). > > > Am I missing something ? Of course that assumes that the absolute > > > maximum alarm timeout matches range_max, but I didn't find any > > > drivers where that would not be the case. > > > > > > > There are RTCs where this is not the case. When this is far away in the > > future enough, the usual solution is to clip range_max which works but > > is not really great intellectually. > > > Do you have an example, by any chance ? > I'm sorry, I've been looking and I couldn't find it anymore. Don't bother with this for now. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com