public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Frank Rowand <frowand.list@gmail.com>,
	devicetree <devicetree@vger.kernel.org>
Subject: Re: DT yaml bindings: handling of complicated compatible property
Date: Fri, 16 Aug 2019 17:14:33 -0500	[thread overview]
Message-ID: <20190816221433.GA25289@bogus> (raw)
In-Reply-To: <CAMRc=Mc_9=3xYWrrn=naQgFprgLA4wkNJQE1niSiYiACi5XFiw@mail.gmail.com>

On Mon, Jul 29, 2019 at 10:31:17AM +0200, Bartosz Golaszewski wrote:
> Hello,
> 
> I decided to attempt to convert the DT binding for AT24 EEPROM driver
> to yaml and am not sure on how to handle the compatible property with
> a lot of options.
> 
> In at24 we support 23 models and 8 vendors (184 vendor,model
> combinations) plus 5 exceptions (with model names not following the
> general convention).
> 
> Do I simply use the oneOf specifier and list all possible options? Or
> is there a better approach.

Normally, yes. But this one is a bit special. You can use 'pattern' to 
address the 184 cases with a regex and then the 5 exceptions under other 
oneOf entries.

Rob

      reply	other threads:[~2019-08-16 22:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29  8:31 DT yaml bindings: handling of complicated compatible property Bartosz Golaszewski
2019-08-16 22:14 ` Rob Herring [this message]

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=20190816221433.GA25289@bogus \
    --to=robh@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.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