Skip to content

Commit d057a1e

Browse files
prabhakarladgregkh
authored andcommitted
dt-bindings: serial: renesas,scif: Validate 'interrupts' and 'interrupt-names'
This commit adds 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 <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 220fb8f commit d057a1e

File tree

1 file changed

+55
-18
lines changed

1 file changed

+55
-18
lines changed

Documentation/devicetree/bindings/serial/renesas,scif.yaml

Lines changed: 55 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,33 +87,24 @@ properties:
8787
oneOf:
8888
- items:
8989
- description: A combined interrupt
90-
- items:
91-
- description: Error interrupt
92-
- description: Receive buffer full interrupt
93-
- description: Transmit buffer empty interrupt
94-
- description: Break interrupt
9590
- items:
9691
- description: Error interrupt
9792
- description: Receive buffer full interrupt
9893
- description: Transmit buffer empty interrupt
9994
- description: Break interrupt
10095
- description: Data Ready interrupt
10196
- description: Transmit End interrupt
97+
minItems: 4
10298

10399
interrupt-names:
104-
oneOf:
105-
- items:
106-
- const: eri
107-
- const: rxi
108-
- const: txi
109-
- const: bri
110-
- items:
111-
- const: eri
112-
- const: rxi
113-
- const: txi
114-
- const: bri
115-
- const: dri
116-
- const: tei
100+
minItems: 4
101+
items:
102+
- const: eri
103+
- const: rxi
104+
- const: txi
105+
- const: bri
106+
- const: dri
107+
- const: tei
117108

118109
clocks:
119110
minItems: 1
@@ -174,6 +165,52 @@ allOf:
174165
required:
175166
- resets
176167

168+
- if:
169+
properties:
170+
compatible:
171+
contains:
172+
enum:
173+
- renesas,rcar-gen1-scif
174+
- renesas,rcar-gen2-scif
175+
- renesas,rcar-gen3-scif
176+
- renesas,rcar-gen4-scif
177+
then:
178+
properties:
179+
interrupts:
180+
maxItems: 1
181+
182+
interrupt-names: false
183+
184+
- if:
185+
properties:
186+
compatible:
187+
contains:
188+
enum:
189+
- renesas,scif-r7s72100
190+
then:
191+
properties:
192+
interrupts:
193+
minItems: 4
194+
maxItems: 4
195+
196+
interrupt-names:
197+
maxItems: 4
198+
199+
- if:
200+
properties:
201+
compatible:
202+
contains:
203+
enum:
204+
- renesas,scif-r7s9210
205+
- renesas,scif-r9a07g044
206+
then:
207+
properties:
208+
interrupts:
209+
minItems: 6
210+
211+
interrupt-names:
212+
minItems: 6
213+
177214
unevaluatedProperties: false
178215

179216
examples:

0 commit comments

Comments
 (0)