Skip to content

Commit

Permalink
dt-bindings: display: panel-timing: Define a single type for properties
Browse files Browse the repository at this point in the history
It's not good practice to define multiple types for the same property, so
factor out the type reference making the properties always an uint32-array
with a length of 1 or 3 items.

Signed-off-by: Rob Herring <[email protected]>
Reviewed-by: Sam Ravnborg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
robherring committed Apr 14, 2022
1 parent 5a674d9 commit 652980b
Showing 1 changed file with 18 additions and 24 deletions.
42 changes: 18 additions & 24 deletions Documentation/devicetree/bindings/display/panel/panel-timing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,78 +71,72 @@ properties:

hfront-porch:
description: Horizontal front porch panel timing
$ref: /schemas/types.yaml#/definitions/uint32-array
oneOf:
- $ref: /schemas/types.yaml#/definitions/uint32
maxItems: 1
- maxItems: 1
items:
description: typical number of pixels
- $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
- minItems: 3
maxItems: 3
items:
description: min, typ, max number of pixels

hback-porch:
description: Horizontal back porch timing
$ref: /schemas/types.yaml#/definitions/uint32-array
oneOf:
- $ref: /schemas/types.yaml#/definitions/uint32
maxItems: 1
- maxItems: 1
items:
description: typical number of pixels
- $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
- minItems: 3
maxItems: 3
items:
description: min, typ, max number of pixels

hsync-len:
description: Horizontal sync length panel timing
$ref: /schemas/types.yaml#/definitions/uint32-array
oneOf:
- $ref: /schemas/types.yaml#/definitions/uint32
maxItems: 1
- maxItems: 1
items:
description: typical number of pixels
- $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
- minItems: 3
maxItems: 3
items:
description: min, typ, max number of pixels

vfront-porch:
description: Vertical front porch panel timing
$ref: /schemas/types.yaml#/definitions/uint32-array
oneOf:
- $ref: /schemas/types.yaml#/definitions/uint32
maxItems: 1
- maxItems: 1
items:
description: typical number of lines
- $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
- minItems: 3
maxItems: 3
items:
description: min, typ, max number of lines

vback-porch:
description: Vertical back porch panel timing
$ref: /schemas/types.yaml#/definitions/uint32-array
oneOf:
- $ref: /schemas/types.yaml#/definitions/uint32
maxItems: 1
- maxItems: 1
items:
description: typical number of lines
- $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
- minItems: 3
maxItems: 3
items:
description: min, typ, max number of lines

vsync-len:
description: Vertical sync length panel timing
$ref: /schemas/types.yaml#/definitions/uint32-array
oneOf:
- $ref: /schemas/types.yaml#/definitions/uint32
maxItems: 1
- maxItems: 1
items:
description: typical number of lines
- $ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 3
- minItems: 3
maxItems: 3
items:
description: min, typ, max number of lines
Expand Down

0 comments on commit 652980b

Please sign in to comment.