Re: [PATCH v2 2/5] dt-bindings: display: ssd1307fb: Extend schema for SPI controllers

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

 



Hello Geert,

On 4/12/22 09:16, Geert Uytterhoeven wrote:
> Hi Javier,
> 
> 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>
>> Acked-by: Mark Brown <broonie@xxxxxxxxxx>
>> ---
>>
>> Changes in v2:
>> - Don't add compatible strings with an "-spi" suffix (Geert Uytterhoeven).
> 
> Thanks for the update!
>

You are welcome and thanks for your prompt review and feedback!
 
>> --- 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.

> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>

Thanks!

-- 
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux