Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp947596rdb; Wed, 1 Nov 2023 07:19:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmvKaPdMrKMkR9QFXErgwdTKpo7xXtXqp3/V+1suribPLFoalNbXkXx8sQPjMcyh9v0kyq X-Received: by 2002:a05:6a20:6a05:b0:17a:fcda:4a6b with SMTP id p5-20020a056a206a0500b0017afcda4a6bmr15119807pzk.13.1698848397000; Wed, 01 Nov 2023 07:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698848396; cv=none; d=google.com; s=arc-20160816; b=OWo58QUyRqMCKrYpvNOQAHm73ckhZInnAwKi7BlEbJfkdBlyGeCq3EUkFmEK4hpkFw Hz0NWDDWXmHvMxEE93UgB+GDAYj//qAyn+XgnrHGpr38nZCDTlEZ+RpJTU6I0ZMLAkh4 ZnCw9Wb3A+S982nBTViZ8g4RdEwntnnihmKzsVcsixCqmqzYInW5e1YXM6RsOftaZeEy qM0pHhD+9Ic9pD32pmq/uwdMHOl4buj34h5fkPAaKenxkJhvyrgK3i6l96kzMK2ZJBBL OdnTUc0dUQzN8Uwzz00zAvNzv5mln/gt4GTNGUtXvwqHtXjRh+4Hu8t4XBuu36E95eku SxJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=OCON80s5+YBfYIu8CqkppkNaABmnDO3nFsvKwtvLV2k=; fh=JW0JghGY6vE3OKkp1KC8N4luFyu9su5U+Guqz6aUu/s=; b=GECu/kHTafeox1Wf5v12qPGB7PvN4IJMHtHt+bTB7Fs8qEwS0lMnUVph/4M3rl+2Bb T678UjLIHST0SGohmDQ/k5XsZXOI2JTvvewFE7W8yrJqfeuo2wg4SNe4f7VVF+4LpJa0 L3EjSCCY7jKJjK6WT4AQIJ6N9ukCm9QuHc3LjiR5l1Ml1Cdukkyb3FHH9G2mB409TcJ5 5wD23F791oBmLDp6/h1oN7FOGPWc+imsgG8SUvbgFlNqNT0L7y/ZRNjz6isPAClm6jil iw6lWJjZTooPZkcQLEqHd/2Zulm2RAvSWkKP5s50MQvwQZGxnjBML1L0EFdqGXz0m9hf JYSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=N5L7RROl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bx37-20020a056a02052500b0056a1ed17deasi3250035pgb.675.2023.11.01.07.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 07:19:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b=N5L7RROl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 23B6E80FA9CB; Wed, 1 Nov 2023 07:19:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344313AbjKAOTn (ORCPT + 99 others); Wed, 1 Nov 2023 10:19:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232094AbjKAOTm (ORCPT ); Wed, 1 Nov 2023 10:19:42 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A980DC; Wed, 1 Nov 2023 07:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:Mime-Version:Message-Id:Cc:To:From :Date:subject:date:message-id:reply-to; bh=OCON80s5+YBfYIu8CqkppkNaABmnDO3nFsvKwtvLV2k=; b=N5L7RROlMKNHC0MTKFbiB/5ZxP PT0zK4Q3Ip1YMbe8c4/sIZ+W0d3tKXM9N5XBFsihGEd1nksb4AWPgyrDqxf+T2YCzPQhoBZ67iqgJ +D1SfnV/qssCq9Pu/kHQRz9LAMiVI5shaoSYbGTBS+YH9NZRY8qk9ziU03F+lDwBHwqo=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:37880 helo=pettiford) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1qyC3x-0005yH-RT; Wed, 01 Nov 2023 10:19:22 -0400 Date: Wed, 1 Nov 2023 10:19:16 -0400 From: Hugo Villeneuve To: Hugo Villeneuve Cc: Alexandre Belloni , Conor Dooley , a.zummo@towertech.it, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bruno.thomsen@gmail.com, Hugo Villeneuve Message-Id: <20231101101916.259618f7e5d4abfcac2ffe9b@hugovil.com> In-Reply-To: <20231011182330.393f4ec10ba53c85cb09c7e8@hugovil.com> References: <20230802191153.952667-1-hugo@hugovil.com> <20230802191153.952667-2-hugo@hugovil.com> <20230808-capsize-deodorize-5776d3dbb192@spud> <20230808082533.b608c9a2a4bd922920643c4b@hugovil.com> <202308081232266ec8a9b7@mail.local> <20230808084426.fc7e432a9d85e5caf72d3ffe@hugovil.com> <20230905113058.0fed933265fb68cd53b6d0fa@hugovil.com> <20230919113423.6c8c48cb1b89275f5b4f3cc2@hugovil.com> <20231011182330.393f4ec10ba53c85cb09c7e8@hugovil.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: [PATCH 1/2] dt-bindings: rtc: add properties to set battery-related functions X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 01 Nov 2023 07:19:56 -0700 (PDT) On Wed, 11 Oct 2023 18:23:30 -0400 Hugo Villeneuve wrote: > On Tue, 19 Sep 2023 11:34:23 -0400 > Hugo Villeneuve wrote: > > > On Tue, 5 Sep 2023 11:30:58 -0400 > > Hugo Villeneuve wrote: > > > > > On Tue, 8 Aug 2023 08:44:26 -0400 > > > Hugo Villeneuve wrote: > > > > > > > On Tue, 8 Aug 2023 14:32:26 +0200 > > > > Alexandre Belloni wrote: > > > > > > > > > On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > > > > > > On Tue, 8 Aug 2023 12:21:24 +0100 > > > > > > Conor Dooley wrote: > > > > > > > > > > > > > Hey Hugo, > > > > > > > > > > > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > > > > > > From: Hugo Villeneuve > > > > > > > > > > > > > > > > These properties can be defined in the board's device tree to set the > > > > > > > > default power-on values for battery-related functions. > > > > > > > > > > > > > > > > Signed-off-by: Hugo Villeneuve > > > > > > > > --- > > > > > > > > .../devicetree/bindings/rtc/rtc.yaml | 19 +++++++++++++++++++ > > > > > > > > 1 file changed, 19 insertions(+) > > > > > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/rtc/rtc.yaml b/Documentation/devicetree/bindings/rtc/rtc.yaml > > > > > > > > index efb66df82782..0217d229e3fa 100644 > > > > > > > > --- a/Documentation/devicetree/bindings/rtc/rtc.yaml > > > > > > > > +++ b/Documentation/devicetree/bindings/rtc/rtc.yaml > > > > > > > > @@ -26,6 +26,25 @@ properties: > > > > > > > > 0: not chargeable > > > > > > > > 1: chargeable > > > > > > > > > > > > > > > > + battery-low-detect: > > > > > > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > > > > > > + enum: [0, 1] > > > > > > > > + description: | > > > > > > > > + For RTC devices supporting a backup battery/supercap, this flag can be > > > > > > > > + used to configure the battery low detection reporting function: > > > > > > > > + 0: disabled > > > > > > > > + 1: enabled > > > > > > > > + > > > > > > > > + battery-switch-over: > > > > > > > > + $ref: /schemas/types.yaml#/definitions/uint32 > > > > > > > > + enum: [0, 1] > > > > > > > > + description: | > > > > > > > > + For RTC devices supporting a backup battery/supercap, this flag can be > > > > > > > > + used to configure the battery switch over when the main voltage source is > > > > > > > > + turned off: > > > > > > > > + 0: disabled > > > > > > > > + 1: enabled > > > > > > > > > > > > > > Why are these implemented as enums? This seems to fall into the category > > > > > > > of using DT to determine software policy - why's it not sufficient to > > > > > > > have boolean properties that indicate hardware support and let the software > > > > > > > decide what to do with them? > > > > > > > > > > > > Hi Conor, > > > > > > the reason is that I based the new properties on the existing property > > > > > > "aux-voltage-chargeable": > > > > > > > > > > > > ------------------- > > > > > > aux-voltage-chargeable: > > > > > > $ref: /schemas/types.yaml#/definitions/uint32 > > > > > > enum: [0, 1] > > > > > > description: | > > > > > > Tells whether the battery/supercap of the RTC (if any) is > > > > > > chargeable or not: > > > > > > 0: not chargeable > > > > > > 1: chargeable > > > > > > ------------------- > > > > > > > > > > > > I agree with you that a boolean would be more appropriate. Should I > > > > > > also submit a (separate) patch to fix the "aux-voltage-chargeable" > > > > > > property to a boolean? > > > > > > > > > > > > > > > > No, this is an enum on purpose. > > > > > I will not take battery switch over related properties, this is not > > > > > hardware description but software configuration. There is an ioctl for > > > > > this. > > > > > > > > Hi Alexandre, > > > > can you suggest then how we can set default PWRMNG values for the > > > > PCF2131 then? > > > > > > > > I looked at Documentation/ABI/testing/rtc-cdev but couldn't find an > > > > ioctl to activate the battery switch over function, nor one to activate > > > > the battery-low detection... > > > > > > Ping... > > > > Second ping... > > > > Hugo. > > Third ping... Hi Alexandre, Fourth ping... People are writing to me off the mailing list to indicate that there is a "bug" with the PCF2131 driver relating to PWRMNG incorrect values. Can you answer my question so that we can find a solution to this problem? Hugo. > > > > > > > > + > > > > > > > > quartz-load-femtofarads: > > > > > > > > description: > > > > > > > > The capacitive load of the quartz(x-tal), expressed in femto > > > > > > > > -- > > > > > > > > 2.30.2 > > > > > > > > > > > > > > > > > > -- > > > > > Alexandre Belloni, co-owner and COO, Bootlin > > > > > Embedded Linux and Kernel engineering > > > > > https://bootlin.com > > >