Re: [PATCH v3 2/4] dt-bindings: serial: renesas,scif: Validate 'interrupts' and 'interrupt-names'

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

 



Hi Krzysztof,

On Tue, Mar 19, 2024 at 6:22 AM Krzysztof Kozlowski
<krzysztof.kozlowski@xxxxxxxxxx> wrote:
>
> On 19/03/2024 07:19, Krzysztof Kozlowski wrote:
> > On 18/03/2024 18:21, Prabhakar wrote:
> >> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> >>
> >> Add support to validate the 'interrupts' and 'interrupt-names' properties
> >> for every supported SoC. This ensures proper handling and configuration of
> >> interrupt-related properties across supported platforms.
> >>
> >> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> >> ---
> >> v2->v3
> >> - Listed interrupts and interrupt-names for every SoC in if check
> >> ---
> >>  .../bindings/serial/renesas,scif.yaml         | 95 ++++++++++++-------
> >>  1 file changed, 63 insertions(+), 32 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/serial/renesas,scif.yaml b/Documentation/devicetree/bindings/serial/renesas,scif.yaml
> >> index af72c3420453..53f18e9810fd 100644
> >> --- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml
> >> +++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml
> >> @@ -82,38 +82,6 @@ properties:
> >>    reg:
> >>      maxItems: 1
> >>
> >> -  interrupts:
> >
> > I don't understand what is happening with this patchset. Interrupts must
> > stay here. Where did you receive any different feedback?
>
> Look how it is done:
> https://elixir.bootlin.com/linux/v6.8/source/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml#L44
>
Thanks for the pointer, as the above binding doesn't have any
description items as compared to our case, to clarify I have updated
the binding is below. Is this the correct approach?

option #1
---------------
  interrupts:
    minItems: 1
    maxItems: 6

 interrupt-names:
    minItems: 4
    maxItems: 6

  - if:
      properties:
        compatible:
          contains:
            enum:
              - renesas,rcar-gen1-scif
              - renesas,rcar-gen2-scif
              - renesas,rcar-gen3-scif
              - renesas,rcar-gen4-scif
    then:
      properties:
        interrupts:
          items:
            - description: Single combined interrupt

        interrupt-names: false

  - if:
      properties:
        compatible:
          contains:
            const: renesas,scif-r7s72100
    then:
      properties:
        interrupts:
          items:
            - description: Error interrupt
            - description: Receive buffer full interrupt
            - description: Transmit buffer empty interrupt
            - description: Break interrupt

        interrupt-names:
          items:
            - const: eri
            - const: rxi
            - const: txi
            - const: bri
  - if:
      properties:
        compatible:
          contains:
            enum:
              - renesas,scif-r7s9210
              - renesas,scif-r9a07g044
    then:
      properties:
        interrupts:
          items:
            - description: Error interrupt
            - description: Receive buffer full interrupt
            - description: Transmit buffer empty interrupt
            - description: Break interrupt
            - description: Data Ready interrupt
            - description: Transmit End interrupt

        interrupt-names:
          items:
            - const: eri
            - const: rxi
            - const: txi
            - const: bri
            - const: dri
            - const: tei

Cheers,
Prabhakar





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux