Hi Javier, On Tue, Apr 12, 2022 at 10:01 AM Javier Martinez Canillas <javierm@xxxxxxxxxx> wrote: > On 4/12/22 09:16, Geert Uytterhoeven wrote: > > On Mon, Apr 11, 2022 at 11:12 PM Javier Martinez Canillas > > <javierm@xxxxxxxxxx> wrote: > >> The Solomon SSD130x OLED displays can either have an I2C or SPI interface, > >> add to the schema the properties and examples for OLED devices under SPI. > >> > >> Signed-off-by: Javier Martinez Canillas <javierm@xxxxxxxxxx> > >> --- a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml > >> +++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml > >> @@ -39,9 +39,14 @@ properties: > >> reset-gpios: > >> maxItems: 1 > >> > >> + dc-gpios: > >> + maxItems: 1 > >> + > > > > Perhaps add a description, and clarify this is for SPI only? > > I wondered how to make it required for SPI but couldn't find another binding > that did the same and I'm not that familiar with DT schemas to figure it out. > > Before, when I had compatible strings just for SPI I could do the following: > > - if: > properties: > compatible: > contains: > enum: > - sinowealth,sh1106-spi > - solomon,ssd1305-spi > - solomon,ssd1306-spi > - solomon,ssd1307-spi > - solomon,ssd1309-spi > then: > required: > - spi-max-frequency > - dc-gpios > > but now that we are using the same compatible strings for I2C and SPI, the > compatible string can't be used anymore as an indication to make required. > > Do you have any hints here on how I should enforce this in the schema ? > > Or if you think that a comment is enough, then I will add it in v3. I don't know how to make it required for SPI, if possible at all. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds