All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Valentin Caron <valentin.caron@foss.st.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Gabriel Fernandez <gabriel.fernandez@foss.st.com>,
	Amelie Delaunay <amelie.delaunay@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
Subject: Re: [PATCH 2/6] dt-bindings: rtc: stm32: add alarm A out property to select output
Date: Wed, 4 May 2022 10:42:40 -0500	[thread overview]
Message-ID: <YnKe8K3FjoaUO2ml@robh.at.kernel.org> (raw)
In-Reply-To: <20220504130617.331290-1-valentin.caron@foss.st.com>

On Wed, May 04, 2022 at 03:06:13PM +0200, Valentin Caron wrote:
> STM32 RTC can pulse some SOC pins when an alarm of RTC expires.
> 
> This patch adds property to activate alarm A output. The pulse can
> output on three pins RTC_OUT1, RTC_OUT2, RTC_OUT2_RMP
> (PC13, PB2, PI8 on stm32mp15) (PC13, PB2, PI1 on stm32mp13).
> 
> Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
> ---
>  .../devicetree/bindings/rtc/st,stm32-rtc.yaml | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml b/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> index 56d46ea35c5d..71e02604e8de 100644
> --- a/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> @@ -59,6 +59,13 @@ properties:
>        Refer to <include/dt-bindings/rtc/rtc-stm32.h> for the supported values.
>        Pinctrl state named "default" may be defined to reserve pin for RTC output.
>  
> +  st,alarm:
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    description: |
> +      To select and enable RTC Alarm A output.
> +      Refer to <include/dt-bindings/rtc/rtc-stm32.h> for the supported values.

No, sorry, you need to define the allowed values as a schema here.

> +      Pinctrl state named "default" may be defined to reserve pin for RTC output.
> +
>  allOf:
>    - if:
>        properties:
> @@ -75,6 +82,9 @@ allOf:
>          st,lsco:
>            maxItems: 0
>  
> +        st,alarm:
> +          maxItems: 0

st,alarm: false

or:

not:
  required: [ st,alarm ]

is how you disallow a property.

This should cause a warning, but this patch didn't apply for me.

> +
>          clock-names: false
>  
>        required:
> @@ -95,6 +105,9 @@ allOf:
>          st,lsco:
>            maxItems: 0
>  
> +        st,alarm:
> +          maxItems: 0
> +
>        required:
>          - clock-names
>          - st,syscfg
> @@ -117,6 +130,9 @@ allOf:
>          st,lsco:
>            maxItems: 1
>  
> +        st,alarm:
> +          maxItems: 1

maxItems applies to arrays, but this is a scalar value. I don't think 
you need this hunk.

> +
>        required:
>          - clock-names
>  
> @@ -153,8 +169,9 @@ examples:
>        clocks = <&rcc RTCAPB>, <&rcc RTC>;
>        clock-names = "pclk", "rtc_ck";
>        interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> +      st,alarm = <RTC_OUT1>;
>        st,lsco = <RTC_OUT2_RMP>;
> -      pinctrl-0 = <&rtc_out2_rmp_pins_a>;
> +      pinctrl-0 = <&rtc_out1_pins_a &rtc_out2_rmp_pins_a>;
>        pinctrl-names = "default";
>      };
>  
> -- 
> 2.25.1
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Valentin Caron <valentin.caron@foss.st.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Gabriel Fernandez <gabriel.fernandez@foss.st.com>,
	Amelie Delaunay <amelie.delaunay@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
Subject: Re: [PATCH 2/6] dt-bindings: rtc: stm32: add alarm A out property to select output
Date: Wed, 4 May 2022 10:42:40 -0500	[thread overview]
Message-ID: <YnKe8K3FjoaUO2ml@robh.at.kernel.org> (raw)
In-Reply-To: <20220504130617.331290-1-valentin.caron@foss.st.com>

On Wed, May 04, 2022 at 03:06:13PM +0200, Valentin Caron wrote:
> STM32 RTC can pulse some SOC pins when an alarm of RTC expires.
> 
> This patch adds property to activate alarm A output. The pulse can
> output on three pins RTC_OUT1, RTC_OUT2, RTC_OUT2_RMP
> (PC13, PB2, PI8 on stm32mp15) (PC13, PB2, PI1 on stm32mp13).
> 
> Signed-off-by: Valentin Caron <valentin.caron@foss.st.com>
> ---
>  .../devicetree/bindings/rtc/st,stm32-rtc.yaml | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml b/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> index 56d46ea35c5d..71e02604e8de 100644
> --- a/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> @@ -59,6 +59,13 @@ properties:
>        Refer to <include/dt-bindings/rtc/rtc-stm32.h> for the supported values.
>        Pinctrl state named "default" may be defined to reserve pin for RTC output.
>  
> +  st,alarm:
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    description: |
> +      To select and enable RTC Alarm A output.
> +      Refer to <include/dt-bindings/rtc/rtc-stm32.h> for the supported values.

No, sorry, you need to define the allowed values as a schema here.

> +      Pinctrl state named "default" may be defined to reserve pin for RTC output.
> +
>  allOf:
>    - if:
>        properties:
> @@ -75,6 +82,9 @@ allOf:
>          st,lsco:
>            maxItems: 0
>  
> +        st,alarm:
> +          maxItems: 0

st,alarm: false

or:

not:
  required: [ st,alarm ]

is how you disallow a property.

This should cause a warning, but this patch didn't apply for me.

> +
>          clock-names: false
>  
>        required:
> @@ -95,6 +105,9 @@ allOf:
>          st,lsco:
>            maxItems: 0
>  
> +        st,alarm:
> +          maxItems: 0
> +
>        required:
>          - clock-names
>          - st,syscfg
> @@ -117,6 +130,9 @@ allOf:
>          st,lsco:
>            maxItems: 1
>  
> +        st,alarm:
> +          maxItems: 1

maxItems applies to arrays, but this is a scalar value. I don't think 
you need this hunk.

> +
>        required:
>          - clock-names
>  
> @@ -153,8 +169,9 @@ examples:
>        clocks = <&rcc RTCAPB>, <&rcc RTC>;
>        clock-names = "pclk", "rtc_ck";
>        interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> +      st,alarm = <RTC_OUT1>;
>        st,lsco = <RTC_OUT2_RMP>;
> -      pinctrl-0 = <&rtc_out2_rmp_pins_a>;
> +      pinctrl-0 = <&rtc_out1_pins_a &rtc_out2_rmp_pins_a>;
>        pinctrl-names = "default";
>      };
>  
> -- 
> 2.25.1
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-05-04 15:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 13:02 [PATCH 0/6] rtc: stm32: add alarm out and LSCO features Valentin Caron
2022-05-04 13:02 ` Valentin Caron
2022-05-04 13:02 ` [PATCH 1/6] dt-bindings: rtc: stm32: add st,lsco optional property to select output Valentin Caron
2022-05-04 13:02   ` [PATCH 1/6] dt-bindings: rtc: stm32: add st, lsco " Valentin Caron
2022-05-16 23:52   ` [PATCH 1/6] dt-bindings: rtc: stm32: add st,lsco " Rob Herring
2022-05-16 23:52     ` Rob Herring
2022-05-04 13:06 ` [PATCH 2/6] dt-bindings: rtc: stm32: add alarm A out " Valentin Caron
2022-05-04 13:06   ` Valentin Caron
2022-05-04 15:42   ` Rob Herring [this message]
2022-05-04 15:42     ` Rob Herring
2022-05-04 20:27   ` Alexandre Belloni
2022-05-04 20:27     ` Alexandre Belloni
2022-05-23 12:34     ` Valentin CARON
2022-05-23 12:34       ` Valentin CARON
2022-06-24  8:35       ` Valentin CARON
2022-06-24  8:35         ` Valentin CARON
2022-07-22 16:02       ` Alexandre Belloni
2022-07-22 16:02         ` Alexandre Belloni
2022-05-04 13:06 ` [PATCH 3/6] rtc: stm32: add Low Speed Clock Output (LSCO) support Valentin Caron
2022-05-04 13:06   ` Valentin Caron
2022-05-04 13:06 ` [PATCH 4/6] rtc: stm32: add alarm A out feature Valentin Caron
2022-05-04 13:06   ` Valentin Caron
2022-05-04 13:06 ` [PATCH 5/6] ARM: dts: stm32: add RTC LSCO support on stm32mp157c-dk2 Valentin Caron
2022-05-04 13:06   ` Valentin Caron
2022-05-04 13:06 ` [PATCH 6/6] ARM: dts: stm32: add RTC LSCO support on stm32mp135f-dk Valentin Caron
2022-05-04 13:06   ` Valentin Caron

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=YnKe8K3FjoaUO2ml@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=amelie.delaunay@foss.st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gabriel.fernandez@foss.st.com \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.