On Tue, Oct 6, 2020 at 9:57 AM Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx> wrote: > > Hello, > > In order to get the wfx driver out of the staging area, I try to convert > the following DT bindings to YAML: > > drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt > > Unfortunately, the conversion is not straight forward. The WFx device can > be connected on SPI or on SDIO. The requirement for the two interfaces are > different. For exemple: > - <reg> should be set to 1 in SDIO, while it corresponds to the Chip > Select in SPI What's important for 'reg' is how many entries. The bus defines that in both cases here IIRC, so just 'reg: true' is sufficient. > - The attribute reset-gpios is not available in SDIO > - The "interrupt" does not have the same exact meaning in SPI and SDIO > (it is required in SPI, but not in SDIO) Just list them both and note the constraints. That's no worse than what we had before. > I have considered to declare two different devices, but I am not sure the > dtbs_checker will appreciate to have two definitions of the same device. > In add, some attribute descriptions would be redundant. > > I also considered to use conditional statements, but I didn't find how to > check the bus that the device currently use. I've thought about adding a pseudo '$bus' property for this purpose, but no, there's not currently a way to do that. > > Does anyone has some advice about the way to achieve that? > > Thank you, > > -- > Jérôme Pouiller > >