mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Philipp Rosenberger <p.rosenberger@kunbus.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Lino Sanfilippo <l.sanfilippo@kunbus.com>
Subject: Re: [PATCH v2 1/2] dt-bindings: rtc: pcf2127: Add nxp,battery-switch-over property
Date: Tue, 22 Oct 2024 17:35:55 +0100	[thread overview]
Message-ID: <20241022-radiator-blemish-3819dd4d94e0@spud> (raw)
In-Reply-To: <20241022092855.1609427-2-p.rosenberger@kunbus.com>

[-- Attachment #1: Type: text/plain, Size: 1985 bytes --]

On Tue, Oct 22, 2024 at 11:28:54AM +0200, Philipp Rosenberger wrote:
> The nxp,battery-switch-over property is used to control the switch-over,
> battery low detection and extra power fail detection functions.
> 
> The PCF2131 has a different default value for the PWRMNG bits. It is set
> to 0x7: battery switch-over function is disabled, only one power supply
> (VDD); battery low detection function is disabled.
> This is the opposite of the default of the PCF2127/PCA2129 and PCF2129.
> With the nxp,battery-switch-over the behavior can be controlled through
> the device tree.
> 
> Signed-off-by: Philipp Rosenberger <p.rosenberger@kunbus.com>
> ---
>  Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
> index 2d9fe5a75b06..5739c3e371e7 100644
> --- a/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
> +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
> @@ -30,6 +30,16 @@ properties:
>  
>    reset-source: true
>  
> +  nxp,battery-switch-over:
> +    description:
> +      Battery and power related configuration. This property is used to set the
> +      PWRMNG bits of the Control_3 register to control the battery switch-over,
> +      battery low detection and extra power fail detection functions.
> +      The actual supported functions depend on the device capabilities.
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    minimum: 0
> +    maximum: 7

Beyond the fact that I dislike register-content properties like this, where
it is not possible to grok the meaning by reading the property, what
even makes this suitable for DT in the first place? Reading the commit
message this sounds like software policy, and that different users of
the same board might want to configure these register bits in different
ways.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-10-22 16:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22  9:28 [PATCH v2 0/2] rtc: pcf2127: make battery switch-over configurable Philipp Rosenberger
2024-10-22  9:28 ` [PATCH v2 1/2] dt-bindings: rtc: pcf2127: Add nxp,battery-switch-over property Philipp Rosenberger
2024-10-22 16:35   ` Conor Dooley [this message]
2024-10-23  7:06     ` Krzysztof Kozlowski
2024-10-24  7:11     ` Philipp Rosenberger
2024-10-24  7:25       ` Krzysztof Kozlowski
2024-10-28 14:54         ` Philipp Rosenberger
2024-10-28 15:55           ` Krzysztof Kozlowski
2024-10-22  9:28 ` [PATCH v2 2/2] rtc: pcf2127: make battery switch-over configurable Philipp Rosenberger
2024-10-23  0:07   ` Nobuhiro Iwamatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241022-radiator-blemish-3819dd4d94e0@spud \
    --to=conor@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=l.sanfilippo@kunbus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=p.rosenberger@kunbus.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®