linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Javier Carrasco <javier.carrasco@wolfvision.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: rtc: nxp,pcf8563: add hiz-output property
Date: Thu, 26 Oct 2023 00:23:27 +0200	[thread overview]
Message-ID: <20231025222327c0b5d460@mail.local> (raw)
In-Reply-To: <20231024-topic-pcf85363_hiz_output-v1-2-50908aff0e52@wolfvision.net>

Hello,

I'm sorry I never replied to your previous thread...

On 25/10/2023 18:21:55+0200, Javier Carrasco wrote:
> The "hiz-output" property models the RTC output as a high-impedance
> (hi-Z) output.
> 
> This property is optional and if it is not defined, the output will
> either act as an output clock (default mode) or as an interrupt
> depending on the configuration set by other properties.
> 
> Two modes are defined in case the high-impedance is used: "enabled" and
> "sleep". The former disables the RTC output completely while the latter
> keeps the RTC output disabled until the system enters in sleep mode.
> This option is especially relevant if the output clock is used to feed a
> PMU, a PMIC or any other device required to run when the rest of the
> system is down. For the sake of completeness, a "disabled" mode has been
> added, which acts as if the property was not defined.
> 
> Document "hiz-output" as a non-required property.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
> ---
>  Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml
> index 52aa3e2091e9..4b27a9154191 100644
> --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml
> +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml
> @@ -36,6 +36,19 @@ properties:
>      enum: [6000, 7000, 12500]
>      default: 7000
>  
> +  hiz-output:
> +    description:
> +      Use enabled if the output should stay in high-impedance. This
> +      mode will mask the output as an interrupt source.
> +      Use sleep if the otuput should be only active in sleep mode.
> +      This mode is compatible with any other output configuration.
> +      The disabled value acts as if the property was not defined.
> +    enum:
> +      - enabled
> +      - sleep
> +      - disabled
> +    default: disabled
> +

If instead of using a custom property, you consider this as what it
actually is: pinmuxing, then everything else comes for free. With
pinctrl, you can define different states for runtime and sleep and they
will get applied automatically instead of open coding in the driver.

Also, how you define this property means that everyone currently using
this RTC is going to have a new warning that they should just ignore.


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2023-10-25 22:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 16:21 [PATCH 0/2] rtc: pcf85363: add support for high-impedance output Javier Carrasco
2023-10-25 16:21 ` [PATCH 1/2] " Javier Carrasco
2023-10-25 16:21 ` [PATCH 2/2] dt-bindings: rtc: nxp,pcf8563: add hiz-output property Javier Carrasco
2023-10-25 22:23   ` Alexandre Belloni [this message]
2023-10-25 22:30     ` Javier Carrasco
2023-10-25 23:23       ` Javier Carrasco
2023-10-26  0:50         ` Alexandre Belloni
2023-10-26  9:41           ` Javier Carrasco
2023-10-26  9:56             ` Alexandre Belloni
2023-10-26 10:13               ` Javier Carrasco
2023-10-26 10:21                 ` Alexandre Belloni
2023-10-26 10:35                   ` Javier Carrasco
2024-01-30 21:34               ` Javier Carrasco

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=20231025222327c0b5d460@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=javier.carrasco@wolfvision.net \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).