linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, masahiroy@kernel.org,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <maz@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2] dt-bindings: interrupt-controller: Convert UniPhier AIDET to json-schema
Date: Wed, 26 Feb 2020 16:13:25 -0600	[thread overview]
Message-ID: <20200226221325.GA19817@bogus> (raw)
In-Reply-To: <20200222110435.18772-1-yamada.masahiro@socionext.com>

On Sat, Feb 22, 2020 at 08:04:35PM +0900, Masahiro Yamada wrote:
> Convert the UniPhier AIDET (ARM Interrupt Detector) binding to DT
> schema format.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Some qeustions:
> 
> I was wondering when 'additionalProperties: false' should be added.
> 
> If I add it to a bus controller device (e.g. I2C),
> I see some schema warnings because various sub-nodes
> are added depending on which device you connect.
> 
> On the other hand, the interrupt controller like this
> does not have a subnode.
> So, probably this is the case where we can add
> 'additionalProperties: false'.
> 
> Is this correct?

Yes.

The problem with 'additionalProperties: false' is it doesn't include 
what any $ref includes. There's a json-schema fix for this coming with 
'unevaluatedProperties', but the json-schema python lib we use doesn't 
yet support that.

> 
> One more thing.
> 
> There are multiple ways to do a similar thing:
> 
>    compatible:
>      enum:
>         - socionext,uniphier-ld4-aidet
>         - socionext,uniphier-pro4-aidet
>         ...
> vs
> 
>    compatible:
>      oneOf:
>         - const: socionext,uniphier-ld4-aidet
>         - const: socionext,uniphier-pro4-aidet
>         ...
> 
> I adopted the former because I can save 'const'.
> If there is a preferred way, I will follow it.

I prefer the former.

> 
> END
> 
> ---
> 
> Changes in v2:
>   - fix the schema warning in the example
> 
>  .../socionext,uniphier-aidet.txt              | 32 ----------
>  .../socionext,uniphier-aidet.yaml             | 61 +++++++++++++++++++
>  2 files changed, 61 insertions(+), 32 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/socionext,uniphier-aidet.txt
>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/socionext,uniphier-aidet.yaml

It all looks fine, so I'll drop the questions and apply.

Rob

  reply	other threads:[~2020-02-26 22:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-22 11:04 [PATCH v2] dt-bindings: interrupt-controller: Convert UniPhier AIDET to json-schema Masahiro Yamada
2020-02-26 22:13 ` Rob Herring [this message]
2020-02-27  1:46   ` Masahiro Yamada

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=20200226221325.GA19817@bogus \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yamada.masahiro@socionext.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).