[PATCH] meta-schemas: interrupts: allow interrupt-controller nodes to be objects

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



RISC-V cores contain basic interrupt controllers, described in
DT 'cpus' data in the form:

        cpu@0 {
		[... other CPU properties ...]
	        interrupt-controller {
                        #interrupt-cells = <1>;
                        compatible = "riscv,cpu-intc";
                        interrupt-controller;
                };
        };

Since the existing interrupts meta-schema requires the type of the
"interrupt-controller" node to be a boolean, it doesn't support this
usage.  Support this by relaxing the type constraint on
"interrupt-controller" nodes to also accept objects.  Since this usage
does not require an "#interrupt-cells" node at the same tree depth as
the "interrupt-controller" object, remove the dependency accordingly.

Signed-off-by: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
---
 meta-schemas/interrupts.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta-schemas/interrupts.yaml b/meta-schemas/interrupts.yaml
index d070acc..dcc031a 100644
--- a/meta-schemas/interrupts.yaml
+++ b/meta-schemas/interrupts.yaml
@@ -18,10 +18,11 @@ properties:
   interrupt-map-mask:
     $ref: "cell.yaml#array"
   interrupt-controller:
-    $ref: "boolean.yaml"
+    oneOf:
+      - $ref: "boolean.yaml"
+      - type: object
 
 dependencies:
-  interrupt-controller: ['#interrupt-cells']
   interrupt-map: ['#interrupt-cells', 'interrupt-map-mask']
   '#interrupt-cells':
     oneOf:
-- 
2.20.1




[Index of Archives]     [Device Tree]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Photos]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]

  Powered by Linux