Re: DT yaml bindings: handling of complicated compatible property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux