public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* DT yaml bindings: handling of complicated compatible property
@ 2019-07-29  8:31 Bartosz Golaszewski
  2019-08-16 22:14 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2019-07-29  8:31 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand; +Cc: devicetree

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.

Best regards,
Bartosz Golaszewski

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: DT yaml bindings: handling of complicated compatible property
  2019-07-29  8:31 DT yaml bindings: handling of complicated compatible property Bartosz Golaszewski
@ 2019-08-16 22:14 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2019-08-16 22:14 UTC (permalink / raw)
  To: Bartosz Golaszewski; +Cc: Frank Rowand, devicetree

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-16 22:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-29  8:31 DT yaml bindings: handling of complicated compatible property Bartosz Golaszewski
2019-08-16 22:14 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox