linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Rob Herring <robh+dt@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Mark Brown <broonie@kernel.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>,
	Stefan Wahren <stefan.wahren@i2se.com>,
	linux-crypto@vger.kernel.org,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, nfraprado@protonmail.com
Subject: Re: [PATCH v3 1/2] dt-bindings: rng: bcm2835: document reset support
Date: Thu, 4 Mar 2021 15:57:36 +0100	[thread overview]
Message-ID: <91B364C3-022E-4FB8-905C-C5B6EB74E784@gmail.com> (raw)
In-Reply-To: <c750ae9f6c55011c07868ba563ac8e5af3e01a2a.camel@suse.de>

Hi Nicolas,

> El 4 mar 2021, a las 14:30, Nicolas Saenz Julienne <nsaenzjulienne@suse.de> escribió:
> 
> On Thu, 2021-03-04 at 13:18 +0100, Álvaro Fernández Rojas wrote:
>> 
>>> El 4 mar 2021, a las 13:07, Nicolas Saenz Julienne <nsaenzjulienne@suse.de> escribió:
>>> 
>>> Hi Alvaro,
>>> 
>>> On Tue, 2021-02-23 at 18:00 +0100, Álvaro Fernández Rojas wrote:
>>>> Some devices may need to perform a reset before using the RNG, such as the
>>>> BCM6368.
>>>> 
>>>> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
>>>> ---
>>>>  v3: make resets required if brcm,bcm6368-rng.
>>>>  v2: document reset support.
>>>> 
>>>>  .../devicetree/bindings/rng/brcm,bcm2835.yaml   | 17 +++++++++++++++++
>>>>  1 file changed, 17 insertions(+)
>>>> 
>>>> diff --git a/Documentation/devicetree/bindings/rng/brcm,bcm2835.yaml b/Documentation/devicetree/bindings/rng/brcm,bcm2835.yaml
>>>> index c147900f9041..11c23e1f6988 100644
>>>> --- a/Documentation/devicetree/bindings/rng/brcm,bcm2835.yaml
>>>> +++ b/Documentation/devicetree/bindings/rng/brcm,bcm2835.yaml
>>>> @@ -37,6 +37,21 @@ required:
>>>>  
>>>> 
>>>> 
>>>>  additionalProperties: false
>>> 
>>> I can't claim I fully understand all the meta stuff in shemas, so I generally
>>> just follow the patterns already available out there.
>> 
>> Well, that makes two of us :).
>> 
>>> That said, shoudln't this be at the end, just before the examples?
>> 
>> I don’t know but I can move it there ¯\_(ツ)_/¯
> 
> Yes please do. See commit 7f464532b05 ("dt-bindings: Add missing
> 'additionalProperties: false'") which expands on why it is needed, and why it
> should be at the end.
> 
>>> Maybe the cause of that odd warning
>>> you got there?
>> 
>> Which odd warning?
> 
> The one pointed out by Rob Herring's script, which I can reproduce too BTW. On
> the other hand I can't really tell what's wrong right away.

Well, I can’t reproduce that locally and I don’t know what’s wrong either, I think that the best option is to remove the full if block.

> 
>> I don’t get any warnings when running (or at least warnings related to rig, because I get warnings related to other yamls):
>> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/rng/brcm,bcm2835.yaml
>> 
>>> 
>>>> +if:
>>>> +  properties:
>>>> +    compatible:
>>>> +      enum:
>>>> +        - brcm,bcm6368-rng
>>>> +then:
>>>> +  properties:
>>>> +    resets:
>>>> +      maxItems: 1
>>>> +  required:
>>>> +    - resets
>>> 
>>> I belive you can't really make a property required when the bindings for
>>> 'brcm,bcm6368-rng' were already defined. This will break the schema for those
>>> otherwise correct devicetrees.
>> 
>> Why not?
>> Wouldn’t just be required for brcm,bcm6368-rng?
> 
> Well, do all 'brcm,bcm6368-rng' users absolutely need the reset controller? If
> so, the original binding is wrong, which should be mentioned and a 'Fixes:' tag
> should be added to the commit message. Otherwise, the requirement is optional.

I’m not sure about this...

> 
> Regards,
> Nicolas

Best regards,
Álvaro.

  reply	other threads:[~2021-03-04 14:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 19:45 [PATCH] hwrng: bcm2835: add reset support Álvaro Fernández Rojas
2021-02-23 16:01 ` [PATCH 0/2] " Álvaro Fernández Rojas
2021-02-23 16:01   ` [PATCH 1/2] dt-bindings: rng: bcm2835: document " Álvaro Fernández Rojas
2021-02-23 16:36     ` Florian Fainelli
2021-02-23 17:17       ` Scott Branden
2021-02-23 17:22         ` Álvaro Fernández Rojas
2021-02-23 16:01   ` [PATCH 2/2] hwrng: bcm2835: add " Álvaro Fernández Rojas
2021-02-24  8:22   ` [PATCH v4 0/2] " Álvaro Fernández Rojas
2021-02-24  8:22     ` [PATCH v4 1/2] dt-bindings: rng: bcm2835: document " Álvaro Fernández Rojas
2021-02-24  8:22     ` [PATCH v4 2/2] hwrng: bcm2835: add " Álvaro Fernández Rojas
2021-03-03 13:52       ` Philipp Zabel
2021-03-03 14:06         ` Álvaro Fernández Rojas
2021-03-03 19:16           ` Florian Fainelli
2021-02-23 17:00 ` [PATCH v3 0/2] " Álvaro Fernández Rojas
2021-02-23 17:00   ` [PATCH v3 1/2] dt-bindings: rng: bcm2835: document " Álvaro Fernández Rojas
2021-02-23 19:34     ` Rob Herring
2021-02-23 20:48       ` Álvaro Fernández Rojas
2021-03-04 12:07     ` Nicolas Saenz Julienne
2021-03-04 12:18       ` Álvaro Fernández Rojas
2021-03-04 13:30         ` Nicolas Saenz Julienne
2021-03-04 14:57           ` Álvaro Fernández Rojas [this message]
2021-03-04 19:58       ` Rob Herring
2021-02-23 17:00   ` [PATCH v3 2/2] hwrng: bcm2835: add " Álvaro Fernández Rojas
2021-02-23 20:43     ` Florian Fainelli

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=91B364C3-022E-4FB8-905C-C5B6EB74E784@gmail.com \
    --to=noltari@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@roeck-us.net \
    --cc=mpm@selenic.com \
    --cc=nfraprado@protonmail.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=p.zabel@pengutronix.de \
    --cc=rikard.falkeborn@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=stefan.wahren@i2se.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).