devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Valentin Caron <valentin.caron@foss.st.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>,
	 Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-rtc@vger.kernel.org,  devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	 Amelie Delaunay <amelie.delaunay@foss.st.com>
Subject: Re: [PATCH v3 0/4] rtc: stm32: add pinctrl interface to handle RTC outs
Date: Fri, 26 Jul 2024 22:37:21 +0200	[thread overview]
Message-ID: <CACRpkdbphGF_2P+bezdaYLE4n_1Z5NYjJfcuCh01ysB6QHC=qQ@mail.gmail.com> (raw)
In-Reply-To: <20240722160022.454226-1-valentin.caron@foss.st.com>

Hi Valentin,

On Mon, Jul 22, 2024 at 6:02 PM Valentin Caron
<valentin.caron@foss.st.com> wrote:

> This series adds a pinctrl/pinmux interface to control STM32 RTC outputs.

Interesting! I think it is the first pin controller outside on
drivers/pinctrl in the kernel tree.

Please include me and the linux-gpio@vger.kernel.org list in
subsequent postings, I want to be sure what gets merged here
and I only noticed this from the LWN driver patches summary.

> As device-trees will be upstreamed separately, here is an example:
>
> stm32-pinctrl {
>     rtc_rsvd_pins_a: rtc-rsvd-0 {
>         pins {
>             pinmux = <STM32_PINMUX('B', 2, AF1)>, /* OUT2 */
>                      <STM32_PINMUX('I', 8, ANALOG)>; /* OUT2_RMP */
>         };
>     };
> };
>
> stm32-rtc {
>     pinctrl-0 = <&rtc_rsvd_pins_a &rtc_alarma_pins_a>;

So the first one is a generic pin control setting and the second
one is a hog for the pins defined by the device itself.

It's clever, and works. Nice work!

(There should probably be a comment in the device tree to say
what is going on so people reading it are not confused.)

>     /* Enable by foo-device */
>     rtc_lsco_pins_a: rtc-lsco-0 {
>         pins = "out2_rmp";
>         function = "lsco";
>     };
>
>     /* Enable by stm32-rtc hog */
>     rtc_alarma_pins_a: rtc-alarma-0 {
>         pins = "out2";
>         function = "alarm-a";
>     };

Yours,
Linus Walleij

  parent reply	other threads:[~2024-07-26 20:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-22 16:00 [PATCH v3 0/4] rtc: stm32: add pinctrl interface to handle RTC outs Valentin Caron
2024-07-22 16:00 ` [PATCH v3 1/4] dt-bindings: rtc: stm32: describe pinmux nodes Valentin Caron
2024-07-23  8:48   ` Krzysztof Kozlowski
2024-07-26 20:38   ` Linus Walleij
2024-07-22 16:00 ` [PATCH v3 2/4] rtc: stm32: add pinctrl and pinmux interfaces Valentin Caron
2024-07-26 20:46   ` Linus Walleij
2024-07-22 16:00 ` [PATCH v3 3/4] rtc: stm32: add Low Speed Clock Output (LSCO) support Valentin Caron
2024-07-26 20:50   ` Linus Walleij
2024-07-22 16:00 ` [PATCH v3 4/4] rtc: stm32: add alarm A out feature Valentin Caron
2024-07-26 20:51   ` Linus Walleij
2024-07-26 20:37 ` Linus Walleij [this message]
2024-07-26 21:29   ` [PATCH v3 0/4] rtc: stm32: add pinctrl interface to handle RTC outs Alexandre Belloni
2024-08-14  9:39 ` Alexandre Belloni

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='CACRpkdbphGF_2P+bezdaYLE4n_1Z5NYjJfcuCh01ysB6QHC=qQ@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=robh@kernel.org \
    --cc=valentin.caron@foss.st.com \
    /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).