Re: [PATCH v2 1/9] dt-bindings: spi: Add STM32 OSPI controller

From: Krzysztof Kozlowski
Date: Thu Jan 30 2025 - 07:26:49 EST


On 30/01/2025 11:28, Patrice CHOTARD wrote:
> For example:
>
> access-controllers:
> description: phandle to the rifsc device to check access right
> and in some cases, an additional phandle to the rcc device for
> secure clock control.
> items:
> - description: phandle to bus controller
> - description: phandle to clock controller
> minItems: 1
> maxItems: 2
>
>
> make dt_binding_check DT_SCHEMA_FILES=st,stm32mp25-ospi.yaml
>
> Documentation/devicetree/bindings/spi/st,stm32mp25-ospi.yaml: properties:access-controllers: {'description': 'phandle to the rifsc device to check access right and in some cases, an additional phandle to the rcc device for secure clock control.', 'items': [{'description': 'phandle to bus controller'}, {'description': 'phandle to clock controller'}], 'minItems': 1, 'maxItems': 2} should not be valid under {'required': ['maxItems']}
> hint: "maxItems" is not needed with an "items" list
> from schema $id: http://devicetree.org/meta-schemas/items.yaml#
> DTC [C] Documentation/devicetree/bindings/spi/st,stm32mp25-ospi.example.dtb
>
> How can i indicate that at least one items is mandatory, the second one is optional and in the same
> time describing the both items as required without getting the above error ?

maxItems is redundant.

Best regards,
Krzysztof