Commit f61eb7bc authored by Rob Herring's avatar Rob Herring Committed by Mauro Carvalho Chehab
Browse files

media: dt-bindings: media: Use OF graph schema



Now that we have a graph schema, rework the media related schemas to
use it. Mostly this is adding a reference to graph.yaml and dropping
duplicate parts from schemas.

Cc: Maxime Ripard <mripard@kernel.org>
Cc: Jacopo Mondi <jacopo@jmondi.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 7fe1d445
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -70,6 +70,7 @@ properties:
  # See ./video-interfaces.txt for details
  # See ./video-interfaces.txt for details
  port:
  port:
    type: object
    type: object
    $ref: /schemas/graph.yaml#/properties/port
    additionalProperties: false
    additionalProperties: false


    properties:
    properties:
+1 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,7 @@ properties:
  # See ./video-interfaces.txt for details
  # See ./video-interfaces.txt for details
  port:
  port:
    type: object
    type: object
    $ref: /schemas/graph.yaml#/properties/port


    properties:
    properties:
      endpoint:
      endpoint:
+7 −24
Original line number Original line Diff line number Diff line
@@ -36,17 +36,9 @@ properties:
    maxItems: 1
    maxItems: 1


  port:
  port:
    type: object
    $ref: /schemas/graph.yaml#/properties/port
    description:
      A node containing a single endpoint as doucmented in
      Documentation/devicetree/bindings/media/video-interfaces.txt


  ports:
  ports: true
    type: object
    description:
      A node containing input and output port nodes with endpoint definitions
      as documented in
      Documentation/devicetree/bindings/media/video-interfaces.txt


additionalProperties: false
additionalProperties: false


@@ -80,24 +72,19 @@ allOf:
    then:
    then:
      properties:
      properties:
        ports:
        ports:
          $ref: /schemas/graph.yaml#/properties/ports
          properties:
          properties:
            '#address-cells':
              const: 1
            '#size-cells':
              const: 0
            port@3:
            port@3:
              type: object
              description: Output port
              description: Output port


          patternProperties:
          patternProperties:
            "^port@[0-2]$":
            "^port@[0-2]$":
              type: object
              description: Input port
              description: Input port


          required:
          required:
            - port@3
            - port@3


          additionalProperties: false
          unevaluatedProperties: false


      required:
      required:
        - ports
        - ports
@@ -110,24 +97,20 @@ allOf:
    then:
    then:
      properties:
      properties:
        ports:
        ports:
          $ref: /schemas/graph.yaml#/properties/ports
          properties:
          properties:
            '#address-cells':
              const: 1
            '#size-cells':
              const: 0
            port@6:
            port@6:
              type: object
              type: object
              description: Output port
              description: Output port


          patternProperties:
          patternProperties:
            "^port@[0-5]$":
            "^port@[0-5]$":
              type: object
              description: Input port
              description: Input port


          required:
          required:
            - port@6
            - port@6


          additionalProperties: false
          unevaluatedProperties: false


      required:
      required:
        - ports
        - ports
+6 −26
Original line number Original line Diff line number Diff line
@@ -64,16 +64,12 @@ properties:
    description:
    description:
      Select which input is selected after reset.
      Select which input is selected after reset.


  ports:
  ports: true
    type: object
    description:
      A node containing input and output port nodes with endpoint definitions
      as documented in
      Documentation/devicetree/bindings/media/video-interfaces.txt


required:
required:
  - compatible
  - compatible
  - reg
  - reg
  - ports


additionalProperties: false
additionalProperties: false


@@ -86,25 +82,17 @@ allOf:
    then:
    then:
      properties:
      properties:
        ports:
        ports:
          $ref: /schemas/graph.yaml#/properties/ports
          properties:
          properties:
            '#address-cells':
              const: 1
            '#size-cells':
              const: 0
            port@0:
            port@0:
              type: object
              description: Input port
              description: Input port
            port@1:
            port@1:
              type: object
              description: Output port
              description: Output port


          required:
          required:
            - port@1
            - port@1


          additionalProperties: false
          unevaluatedProperties: false

      required:
        - ports


  - if:
  - if:
      properties:
      properties:
@@ -114,27 +102,19 @@ allOf:
    then:
    then:
      properties:
      properties:
        ports:
        ports:
          $ref: /schemas/graph.yaml#/properties/ports
          properties:
          properties:
            '#address-cells':
              const: 1
            '#size-cells':
              const: 0
            port@2:
            port@2:
              type: object
              description: Output port
              description: Output port


          patternProperties:
          patternProperties:
            "^port@[0-1]$":
            "^port@[0-1]$":
              type: object
              description: Input port
              description: Input port


          required:
          required:
            - port@2
            - port@2


          additionalProperties: false
          unevaluatedProperties: false

      required:
        - ports


examples:
examples:
  - |
  - |
+1 −1
Original line number Original line Diff line number Diff line
@@ -41,7 +41,7 @@ properties:
    maxItems: 1
    maxItems: 1


  port:
  port:
    type: object
    $ref: /schemas/graph.yaml#/properties/port
    description: |
    description: |
      Output video port. See ../video-interfaces.txt.
      Output video port. See ../video-interfaces.txt.


Loading