All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Eggers <ceggers@arri.de>
To: Rob Herring <robh+dt@kernel.org>
Cc: <devicetree@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: at25: fix syntax error in example code
Date: Tue, 28 Jul 2020 09:34:36 +0200	[thread overview]
Message-ID: <797979108.27KzEp727H@n95hx1g2> (raw)
In-Reply-To: <CAL_Jsq+jJFNQmxnXeA1HmBhM4aUH-qspdTCSRVvEfh0OVDF+DQ@mail.gmail.com>

On Monday, 27 July 2020, 19:56:59 CEST, Rob Herring wrote:
> On Mon, Jul 27, 2020 at 4:05 AM Christian Eggers <ceggers@arri.de> wrote:
> > Add missing semicolon.
> > 
> > Signed-off-by: Christian Eggers <ceggers@arri.de>
> > ---
> > 
> >  Documentation/devicetree/bindings/eeprom/at25.txt | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> At this point, I'd prefer to see this converted to schema instead of
> trivial fixes. Then the tooling will catch these syntax errors.
> 
While trying to convert the at25 binding to yaml, I ran into the following problem:

> Required properties:
> - compatible : Should be "<vendor>,<type>", and generic value "atmel,at25".
> 
>   Example "<vendor>,<type>" values:
>     "anvo,anv32e61w"
>     "microchip,25lc040"
>     "st,m95m02"
>     "st,m95256"

The current binding uses arbitrary values for the compatible string,
only "atmel,at25" is really known by the driver. All other hardware related
settings are provided as separate properties.

When I specify

  compatible:
    enum:
      - atmel,at25

I get an error in dt_binding_check:

Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: eeprom@0: compatible: Additional items are not allowed ('atmel,at25' was unexpected)
Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: eeprom@0: compatible:0: 'st,m95256' is not one of ['atmel,at25']
Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: eeprom@0: compatible: ['st,m95256', 'atmel,at25'] is too long

How to handle this correctly?

regards
Christian



  reply	other threads:[~2020-07-28  7:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 10:05 Christian Eggers
2020-07-27 17:56 ` Rob Herring
2020-07-28  7:34   ` Christian Eggers [this message]
2020-07-31 20:40     ` Rob Herring
2020-08-02 17:46       ` [PATCH] dt-bindings: at25: convert the binding document to yaml Christian Eggers
2020-08-03 22:12         ` Rob Herring
2020-08-04  6:33           ` [PATCH v2] " Christian Eggers
2020-08-12 20:06             ` Rob Herring
2020-08-13  8:59               ` [PATCH v3] " Christian Eggers
2020-08-17 19:35                 ` Rob Herring

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=797979108.27KzEp727H@n95hx1g2 \
    --to=ceggers@arri.de \
    --cc=devicetree@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --subject='Re: [PATCH] dt-bindings: at25: fix syntax error in example code' \
    /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

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.