linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Gatien CHEVALLIER <gatien.chevallier@foss.st.com>,
	Rob Herring <robh@kernel.org>
Cc: Olivia Mackall <olivia@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Lionel Debieve <lionel.debieve@foss.st.com>,
	linux-crypto@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 07/10] dt-bindings: rng: add st,rng-lock-conf
Date: Fri, 15 Sep 2023 12:33:23 +0200	[thread overview]
Message-ID: <726e7f51-ce2c-5ac1-5347-21d6cf40c8c8@linaro.org> (raw)
In-Reply-To: <4819d89b-c2a4-0c75-27e1-d8122827ceca@foss.st.com>

On 15/09/2023 11:28, Gatien CHEVALLIER wrote:
> Hello Rob,
> 
> On 9/11/23 17:09, Rob Herring wrote:
>> On Fri, Sep 08, 2023 at 06:51:17PM +0200, Gatien Chevallier wrote:
>>> If st,rng-lock-conf is set, the RNG configuration in RNG_CR, RNG_HTCR
>>> and RNG_NSCR will be locked. It is supported starting from the RNG
>>> version present in the STM32MP13
>>
>> This should be squashed into the prior binding patch.
>>
>>>
>>> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
>>> ---
>>>   .../devicetree/bindings/rng/st,stm32-rng.yaml      | 14 ++++++++++++++
>>>   1 file changed, 14 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml b/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml
>>> index 59abdc85a9fb..0055f14a8e3f 100644
>>> --- a/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml
>>> +++ b/Documentation/devicetree/bindings/rng/st,stm32-rng.yaml
>>> @@ -37,6 +37,20 @@ required:
>>>     - reg
>>>     - clocks
>>>   
>>> +allOf:
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            enum:
>>> +              - st,stm32mp13-rng
>>> +    then:
>>> +      properties:
>>> +        st,rng-lock-conf:
>>> +          type: boolean
>>> +          description: If set, the RNG configuration in RNG_CR, RNG_HTCR and
>>> +                       RNG_NSCR will be locked.
>>
>> Define the property at the top-level and then restrict its presence in
>> a if/then schema.
>>
> 
> Can you please point me to an example of such case. I can't find a way
> to define at the top-level the property then restrict it to specific
> compatibles.

You can check my slides from the talks about not reaching 10 iterations
of bindings patches.

Or open example-schema (this should be your starting point):
https://elixir.bootlin.com/linux/v5.19/source/Documentation/devicetree/bindings/example-schema.yaml#L212


Also:
https://elixir.bootlin.com/linux/v6.4-rc7/source/Documentation/devicetree/bindings/net/qcom,ipa.yaml#L174
> 
> Else I'd change
> additionalProperties :false to
> unevaluatedProperties: false
> 
> so the definition of the property is seen.

No, why? Definition is there when you move it to the top as asked.

Best regards,
Krzysztof


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

  reply	other threads:[~2023-09-15 10:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 16:51 [PATCH 00/10] hwrng: stm32: support STM32MP13x platforms Gatien Chevallier
2023-09-08 16:51 ` [PATCH 01/10] dt-bindings: rng: introduce new compatible for STM32MP13x Gatien Chevallier
2023-09-11 15:06   ` Rob Herring
2023-09-08 16:51 ` [PATCH 02/10] hwrng: stm32 - use devm_platform_get_and_ioremap_resource() API Gatien Chevallier
2023-09-08 16:51 ` [PATCH 03/10] hwrng: stm32 - implement STM32MP13x support Gatien Chevallier
2023-09-08 16:51 ` [PATCH 04/10] hwrng: stm32 - implement error concealment Gatien Chevallier
2023-09-08 16:51 ` [PATCH 05/10] hwrng: stm32 - rework error handling in stm32_rng_read() Gatien Chevallier
2023-09-08 21:48   ` kernel test robot
2023-09-12  4:02   ` Herbert Xu
2023-09-12  7:36     ` Gatien CHEVALLIER
2023-09-08 16:51 ` [PATCH 06/10] hwrng: stm32 - restrain RNG noise source clock Gatien Chevallier
2023-09-08 16:51 ` [PATCH 07/10] dt-bindings: rng: add st,rng-lock-conf Gatien Chevallier
2023-09-11 15:09   ` Rob Herring
2023-09-12  7:39     ` Gatien CHEVALLIER
2023-09-15  9:28     ` Gatien CHEVALLIER
2023-09-15 10:33       ` Krzysztof Kozlowski [this message]
2023-09-15 12:37         ` Gatien CHEVALLIER
2023-09-08 16:51 ` [PATCH 08/10] hwrng: stm32 - support RNG configuration locking mechanism Gatien Chevallier
2023-09-08 16:51 ` [PATCH 09/10] hwrng: stm32 - rework power management sequences Gatien Chevallier
2023-09-08 19:09   ` kernel test robot
2023-09-08 16:51 ` [PATCH 10/10] ARM: dts: stm32: add RNG node for STM32MP13x platforms Gatien Chevallier

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=726e7f51-ce2c-5ac1-5347-21d6cf40c8c8@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gatien.chevallier@foss.st.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=lionel.debieve@foss.st.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=olivia@selenic.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;
as well as URLs for NNTP newsgroup(s).