Re: [PATCH v2] spi: atmel: convert spi_atmel to json-schema

From: Tudor.Ambarus
Date: Mon Jul 04 2022 - 09:42:56 EST


On 7/4/22 16:24, Tudor Ambarus wrote:
> On 7/4/22 11:31, Sergiu Moga wrote:
>> + atmel,fifo-size:
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + description: |
>> + Maximum number of data the RX and TX FIFOs can store for FIFO
>> + capable SPI controllers.
>> + minimum: 16
>> + maximum: 32
>
> Shouldn't we have an enum instead of a range? Can the FIFO size have a value of 24?

I looked into the driver, when max is 32, one can set 24 for example.
I expect it will work, as the FIFO can handle data that is not multiple with
the FIFO size.

But I can't think of reasons why one would use a smaller FIFO size, so I lean
towards making this an enum instead of a range.

Cheers,
ta