Message ID | 20230802191153.952667-2-hugo@hugovil.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp684971vqx; Wed, 2 Aug 2023 12:40:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlEIOwIsKOxeuKBawLxC+ESHCESPEKl33RxfCpShj2AOV8mrP46sa5EWGbC/ZLwVqTKokJFC X-Received: by 2002:a05:6a20:3cb:b0:13b:9a09:674b with SMTP id 11-20020a056a2003cb00b0013b9a09674bmr13767833pzu.36.1691005241648; Wed, 02 Aug 2023 12:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691005241; cv=none; d=google.com; s=arc-20160816; b=foI59YBjhJOgR7Lxa4bzwm1z9ZVCJAdpjecVQRZaOsnMxwjNYcCdv2Rl80/RSWO2Pu TiaIgLrrFtrJzgJ0EqzPGiWpBjkPcZA0Wirq3WOej8AikmuOCmdgzFdF3g14YcFBjY5m lyBb/gZd6Tkjmn8KD/S1wGUbz92vQYsRy4yvzyTrsLTI1IfkYgxWm24RH0cFbmINQ4wl sc87GktB6FsnAEmKqdAGCahSxbVdzpseUAt6rU0c6EIvg8AGQOEpXXfEsE+VePOBeK2J uHLoZjSrwXt2JiXK2nlFjWfTYOM1OIAB7IlYnEtPFeJm0rkW1tNLtSUK5V/LYD1WtpdR Phog== 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:date:cc:to:from:dkim-signature; bh=2M9zvtOliYXrV0ybBkqt2uj1GMVFpZCfGqdA7mS2T1Q=; fh=FZymoSmdcO0cDPPdWjnPLH+RORnjIOsZUS3qM6HRZPE=; b=OAxZdgIHkV/Jqg5UeCKOPu0D3T9avq5Dx3gre3g6H9nP/VOz7NHhwzLZeMNRX29TMO 6Kf48jfLtM2ogVHeulVo+hKSzkuBddn2TWWEZ1mCfXMLUnjq6OxduBQVVunvAoPiP5RY fQjdgUJ3xYaofkxQLyYUViBdd6OVozv3JjIza76KaHafgmejIdkfBGx9W+XNJ9IpVTb1 1wd9Z6CJchcI72XNFBL6fX+jmJwXVrfbQBKhrJdY7OMCj1qsUs93fI9GAKc3QmPUP0/7 aCLDatNDkkTik9XAZMUkmsvE2/1x+DGw2PjpqurUbp+I7nytYDqPpTvDZ3VJOTfuRook sM+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=wOtxU9lt; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r24-20020a638f58000000b00547b25ea099si5432222pgn.682.2023.08.02.12.40.28; Wed, 02 Aug 2023 12:40:41 -0700 (PDT) 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=fail header.i=@hugovil.com header.s=x header.b=wOtxU9lt; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232707AbjHBTMZ (ORCPT <rfc822;maxi.paulin@gmail.com> + 99 others); Wed, 2 Aug 2023 15:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbjHBTMP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 2 Aug 2023 15:12:15 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7429126AF; Wed, 2 Aug 2023 12:12:12 -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:References: In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2M9zvtOliYXrV0ybBkqt2uj1GMVFpZCfGqdA7mS2T1Q=; b=wOtxU9lty+rX4TtQ9/Cpb/XdE2 oYucuMjAWDvAZ2xty1gP6wKKZhB6kXCNW3isjuW4TFmV9B2GQoGYCi5C4v/hUJBzqvsFr8LkDelTm CcbIofaBYXZJH52DoDvMiqGBgCT4Lv8NW1k85gCcoyXhCHBxyyZ/HD3hkFjkbFSDRSFo=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:50458 helo=localhost.localdomain) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from <hugo@hugovil.com>) id 1qRHGL-0003z2-J1; Wed, 02 Aug 2023 15:12:01 -0400 From: Hugo Villeneuve <hugo@hugovil.com> To: a.zummo@towertech.it, alexandre.belloni@bootlin.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hugo@hugovil.com, bruno.thomsen@gmail.com, Hugo Villeneuve <hvilleneuve@dimonoff.com> Date: Wed, 2 Aug 2023 15:11:52 -0400 Message-Id: <20230802191153.952667-2-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230802191153.952667-1-hugo@hugovil.com> References: <20230802191153.952667-1-hugo@hugovil.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 184.161.19.61 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=-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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: [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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773147512314829757 X-GMAIL-MSGID: 1773147512314829757 |
Series |
rtc: pcf2127: add default battery-related power-on values
|
|
Commit Message
Hugo Villeneuve
Aug. 2, 2023, 7:11 p.m. UTC
From: Hugo Villeneuve <hvilleneuve@dimonoff.com> 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 <hvilleneuve@dimonoff.com> --- .../devicetree/bindings/rtc/rtc.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
Comments
Hey Hugo, On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > 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 <hvilleneuve@dimonoff.com> > --- > .../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? Thanks, Conor. > + > quartz-load-femtofarads: > description: > The capacitive load of the quartz(x-tal), expressed in femto > -- > 2.30.2 >
On Tue, 8 Aug 2023 12:21:24 +0100 Conor Dooley <conor@kernel.org> wrote: > Hey Hugo, > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > 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 <hvilleneuve@dimonoff.com> > > --- > > .../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? Hugo. > Thanks, > Conor. > > > + > > quartz-load-femtofarads: > > description: > > The capacitive load of the quartz(x-tal), expressed in femto > > -- > > 2.30.2 > >
On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > On Tue, 8 Aug 2023 12:21:24 +0100 > Conor Dooley <conor@kernel.org> wrote: > > > Hey Hugo, > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > 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 <hvilleneuve@dimonoff.com> > > > --- > > > .../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. > Hugo. > > > > Thanks, > > Conor. > > > > > + > > > quartz-load-femtofarads: > > > description: > > > The capacitive load of the quartz(x-tal), expressed in femto > > > -- > > > 2.30.2 > > >
On Tue, 8 Aug 2023 14:32:26 +0200 Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: > On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > > On Tue, 8 Aug 2023 12:21:24 +0100 > > Conor Dooley <conor@kernel.org> wrote: > > > > > Hey Hugo, > > > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > 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 <hvilleneuve@dimonoff.com> > > > > --- > > > > .../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... Thank you, Hugo. > > > Hugo. > > > > > > > Thanks, > > > Conor. > > > > > > > + > > > > 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
On Tue, 5 Sep 2023 11:30:58 -0400 Hugo Villeneuve <hugo@hugovil.com> wrote: > On Tue, 8 Aug 2023 08:44:26 -0400 > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > On Tue, 8 Aug 2023 14:32:26 +0200 > > Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: > > > > > On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > > > > On Tue, 8 Aug 2023 12:21:24 +0100 > > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > > > Hey Hugo, > > > > > > > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > > > > > 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 <hvilleneuve@dimonoff.com> > > > > > > --- > > > > > > .../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. > > Thank you, > > Hugo. > > > > > > > > > > > Hugo. > > > > > > > > > > > > > Thanks, > > > > > Conor. > > > > > > > > > > > + > > > > > > 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 >
On Tue, 5 Sep 2023 11:30:58 -0400 Hugo Villeneuve <hugo@hugovil.com> wrote: > On Tue, 8 Aug 2023 08:44:26 -0400 > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > On Tue, 8 Aug 2023 14:32:26 +0200 > > Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: > > > > > On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > > > > On Tue, 8 Aug 2023 12:21:24 +0100 > > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > > > Hey Hugo, > > > > > > > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > > > > > 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 <hvilleneuve@dimonoff.com> > > > > > > --- > > > > > > .../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. > > Thank you, > > Hugo. > > > > > > > > > > > Hugo. > > > > > > > > > > > > > Thanks, > > > > > Conor. > > > > > > > > > > > + > > > > > > 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 >
On Tue, 19 Sep 2023 11:34:23 -0400 Hugo Villeneuve <hugo@hugovil.com> wrote: > On Tue, 5 Sep 2023 11:30:58 -0400 > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > On Tue, 8 Aug 2023 08:44:26 -0400 > > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > > > On Tue, 8 Aug 2023 14:32:26 +0200 > > > Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: > > > > > > > On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > > > > > On Tue, 8 Aug 2023 12:21:24 +0100 > > > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > > > > > Hey Hugo, > > > > > > > > > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > > > > > > > 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 <hvilleneuve@dimonoff.com> > > > > > > > --- > > > > > > > .../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... Hugo. > > > > > Thank you, > > > Hugo. > > > > > > > > > > > > > > > Hugo. > > > > > > > > > > > > > > > > Thanks, > > > > > > Conor. > > > > > > > > > > > > > + > > > > > > > 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 > >
On Tue, 19 Sep 2023 11:34:23 -0400 Hugo Villeneuve <hugo@hugovil.com> wrote: > On Tue, 5 Sep 2023 11:30:58 -0400 > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > On Tue, 8 Aug 2023 08:44:26 -0400 > > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > > > On Tue, 8 Aug 2023 14:32:26 +0200 > > > Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: > > > > > > > On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > > > > > On Tue, 8 Aug 2023 12:21:24 +0100 > > > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > > > > > Hey Hugo, > > > > > > > > > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > > > > > > > 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 <hvilleneuve@dimonoff.com> > > > > > > > --- > > > > > > > .../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... Hugo. > > > > > Thank you, > > > Hugo. > > > > > > > > > > > > > > > Hugo. > > > > > > > > > > > > > > > > Thanks, > > > > > > Conor. > > > > > > > > > > > > > + > > > > > > > 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 > >
On Wed, 11 Oct 2023 18:23:30 -0400 Hugo Villeneuve <hugo@hugovil.com> wrote: > On Tue, 19 Sep 2023 11:34:23 -0400 > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > On Tue, 5 Sep 2023 11:30:58 -0400 > > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > > > On Tue, 8 Aug 2023 08:44:26 -0400 > > > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > > > > > On Tue, 8 Aug 2023 14:32:26 +0200 > > > > Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: > > > > > > > > > On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > > > > > > On Tue, 8 Aug 2023 12:21:24 +0100 > > > > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > > > > > > > Hey Hugo, > > > > > > > > > > > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > > > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > > > > > > > > > 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 <hvilleneuve@dimonoff.com> > > > > > > > > --- > > > > > > > > .../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 > > >
On Wed, 11 Oct 2023 18:23:30 -0400 Hugo Villeneuve <hugo@hugovil.com> wrote: > On Tue, 19 Sep 2023 11:34:23 -0400 > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > On Tue, 5 Sep 2023 11:30:58 -0400 > > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > > > On Tue, 8 Aug 2023 08:44:26 -0400 > > > Hugo Villeneuve <hugo@hugovil.com> wrote: > > > > > > > On Tue, 8 Aug 2023 14:32:26 +0200 > > > > Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: > > > > > > > > > On 08/08/2023 08:25:33-0400, Hugo Villeneuve wrote: > > > > > > On Tue, 8 Aug 2023 12:21:24 +0100 > > > > > > Conor Dooley <conor@kernel.org> wrote: > > > > > > > > > > > > > Hey Hugo, > > > > > > > > > > > > > > On Wed, Aug 02, 2023 at 03:11:52PM -0400, Hugo Villeneuve wrote: > > > > > > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > > > > > > > > > > > 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 <hvilleneuve@dimonoff.com> > > > > > > > > --- > > > > > > > > .../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 > > >
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 + quartz-load-femtofarads: description: The capacitive load of the quartz(x-tal), expressed in femto