Re: [PATCH v2 1/2] media: dt-bindings: renesas,fcp: add top-level constraints
From: Krzysztof Kozlowski
Date: Tue Jan 28 2025 - 11:32:21 EST
On 28/01/2025 17:10, Rob Herring wrote:
> On Tue, Jan 28, 2025 at 10:53:54AM +0100, Krzysztof Kozlowski wrote:
>> Properties with variable number of items per each device are expected to
>> have widest constraints in top-level "properties:" block and further
>> customized (narrowed) in "if:then:". Add missing top-level constraints
>> for clocks and clock-names.
>>
>> Acked-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
>
> How did you find these? The below dtschema patch will find them.
Don't remember, v1 was in August, but I think purely manual - by
reviewing other people's code and then looking at the existing binding file.
> Unfortunately, there's a lot of false positives. We could eliminate some
> of them, but not sure we could get to 0. The main problem is if the
> constraints are somewhere else (e.g. reset-gpios) or via a $ref.
>
> 8<-------------------------------------------------------
>
> diff --git a/dtschema/meta-schemas/cell.yaml b/dtschema/meta-schemas/cell.yaml
> index 3f61ed93593b..b4f0d9ea0559 100644
> --- a/dtschema/meta-schemas/cell.yaml
> +++ b/dtschema/meta-schemas/cell.yaml
> @@ -7,6 +7,7 @@ $id: http://devicetree.org/meta-schemas/cell.yaml#
> $schema: https://json-schema.org/draft/2019-09/schema
I'll give it a try, maybe will point few more cases.
Best regards,
Krzysztof