devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: interrupt-controller: loongson,liointc: Fix warnings about reg and interrupt description
@ 2023-08-15  8:47 Binbin Zhou
  2023-08-15 14:19 ` Conor Dooley
  0 siblings, 1 reply; 5+ messages in thread
From: Binbin Zhou @ 2023-08-15  8:47 UTC (permalink / raw)
  To: Binbin Zhou, Huacai Chen, Thomas Gleixner, Marc Zyngier,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Huacai Chen, loongson-kernel, devicetree, Jiaxun Yang, diasyzhang,
	linux-kernel, Binbin Zhou

As we know, some Loongson-2K CPUs are single-core, e.g. Loongson-2K0500,
and the "isr1" means routing interrupts to core1, which should be
optional. So add maxItems/minItems limits to reg/reg-names.
Also, The interrupt-names attribute represents a list of parent
interrupt names that should change with interrupts.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
---
 .../interrupt-controller/loongson,liointc.yaml     | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
index 00b570c82903..adb428211a72 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml
@@ -11,7 +11,7 @@ maintainers:
 
 description: |
   This interrupt controller is found in the Loongson-3 family of chips and
-  Loongson-2K1000 chip, as the primary package interrupt controller which
+  Loongson-2K series chips, as the primary package interrupt controller which
   can route local I/O interrupt to interrupt lines of cores.
 
 allOf:
@@ -33,6 +33,7 @@ properties:
       - const: main
       - const: isr0
       - const: isr1
+    minItems: 2
 
   interrupt-controller: true
 
@@ -45,11 +46,9 @@ properties:
   interrupt-names:
     description: List of names for the parent interrupts.
     items:
-      - const: int0
-      - const: int1
-      - const: int2
-      - const: int3
+      pattern: int[0-3]
     minItems: 1
+    maxItems: 4
 
   '#interrupt-cells':
     const: 2
@@ -73,7 +72,6 @@ required:
   - '#interrupt-cells'
   - loongson,parent_int_map
 
-
 unevaluatedProperties: false
 
 if:
@@ -86,7 +84,8 @@ if:
 then:
   properties:
     reg:
-      minItems: 3
+      minItems: 2
+      maxItems: 3
 
   required:
     - reg-names
@@ -113,7 +112,6 @@ examples:
                                 <0x0f000000>, /* int1 */
                                 <0x00000000>, /* int2 */
                                 <0x00000000>; /* int3 */
-
     };
 
 ...
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-17 11:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15  8:47 [PATCH] dt-bindings: interrupt-controller: loongson,liointc: Fix warnings about reg and interrupt description Binbin Zhou
2023-08-15 14:19 ` Conor Dooley
2023-08-17  2:56   ` Binbin Zhou
2023-08-17  8:51     ` Conor Dooley
2023-08-17 11:26       ` Binbin Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).