[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbphGF_2P+bezdaYLE4n_1Z5NYjJfcuCh01ysB6QHC=qQ@mail.gmail.com>
Date: Fri, 26 Jul 2024 22:37:21 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Valentin Caron <valentin.caron@...s.st.com>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Alexandre Torgue <alexandre.torgue@...s.st.com>, linux-rtc@...r.kernel.org,
devicetree@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Amelie Delaunay <amelie.delaunay@...s.st.com>
Subject: Re: [PATCH v3 0/4] rtc: stm32: add pinctrl interface to handle RTC outs
Hi Valentin,
On Mon, Jul 22, 2024 at 6:02 PM Valentin Caron
<valentin.caron@...s.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@...r.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
Powered by blists - more mailing lists