Re: [PATCH 1/2] dt-bindings: usb: renesas, usb3-peri: Document RZ/V2M r9a09g011 support

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

 



On 19/07/2022 11:01, Phil Edworthy wrote:
> Hi Krzysztof,
> 
> On 19 July 2022 07:38 Krzysztof Kozlowski wrote:
>> On 18/07/2022 17:24, Phil Edworthy wrote:
>>>>>    phys:
>>>>>      maxItems: 1
>>>>> @@ -43,7 +65,15 @@ properties:
>>>>>      maxItems: 1
>>>>>
>>>>>    resets:
>>>>> -    maxItems: 1
>>>>> +    minItems: 1
>>>>> +    items:
>>>>> +      - description: Peripheral reset
>>>>> +      - description: DRD reset
>>>>> +
>>>>> +  reset-names:
>>>>> +    items:
>>>>> +      - const: aresetn_p
>>>>> +      - const: drd_reset
>>>>>
>>>>>    usb-role-switch:
>>>>>      $ref: /schemas/types.yaml#/definitions/flag
>>>>> @@ -78,6 +108,27 @@ required:
>>>>>    - interrupts
>>>>>    - clocks
>>>>>
>>>>> +allOf:
>>>>> +  - if:
>>>>> +      properties:
>>>>> +        compatible:
>>>>> +          contains:
>>>>> +            enum:
>>>>> +              - renesas,rzv2m-usb3-peri
>>>>> +    then:
>>>>> +      properties:
>>>>> +        clocks:
>>>>> +          minItems: 2
> +        clock-names:
> +          minItems: 2
> (See below)
> 
>>>>> +        interrupts:
>>>>> +          minItems: 2
> +        interrupt-names:
> +          minItems: 2
> (See below)
> 
>>>>> +        resets:
>>>>> +          minItems: 2
>>>>> +      required:
>>>>> +        - clock-names
>>>>> +        - interrupt-names
>>>>> +        - resets
>>>>> +        - reset-names
>>>>
>>>> else:
>>>> narrow the number of items
>>> Sorry, I don't understand why we need minItems: 1 for
>>> interrupt-names/clock-names, but then I'm easily confused!
>>>
>>> None of the existing users have any interrupt-names/clock-names
>>> hence they are not in required. The rzv2m is the only device
>>> that needs them so the driver can get them by name, and hence
>>> it sets minItems: 2
>>
>> They are not required but they can appear. Nothing prevents it, based on
>> your patch.
> 
> Ok, but instead of 'else: narrow the number of items', shouldn't I
> set the clock-names/interrupt-names 'minItems: 2' for rzv2m as above?

Yes.

Best regards,
Krzysztof



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux