aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox/dts
diff options
context:
space:
mode:
authorSimon Glass2020-02-06 09:55:00 -0700
committerBin Meng2020-02-07 22:46:32 +0800
commit025543554c36615a66d66c154f3f763ac788ee15 (patch)
treec792b8de3065a268ee654dc47259c9ef82d08914 /arch/sandbox/dts
parentd9a5fad80857005703d46b6ea27217baa17eb142 (diff)
dm: irq: Add support for requesting interrupts
At present driver model supports the IRQ uclass but there is no way to request a particular interrupt for a driver. Add a mechanism, similar to clock and reset, to read the interrupts required by a device from the device tree and to request those interrupts. U-Boot itself does not have interrupt-driven handlers, so just provide a means to read and clear an interrupt. This can be useful to handle peripherals which must use an interrupt to determine when data is available, for example. Bring over the basic binding file as well, from Linux v5.4. Note that the older binding is not supported in U-Boot; the newer 'special form' must be used. Add a simple test of the new functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/sandbox/dts')
-rw-r--r--arch/sandbox/dts/test.dts5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index e529c54d8de..c2284474314 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -93,6 +93,7 @@
<&gpio_b 9 0xc 3 2 1>;
int-value = <1234>;
uint-value = <(-1234)>;
+ interrupts-extended = <&irq 3 0>;
};
junk {
@@ -357,8 +358,10 @@
vss-microvolts = <0>;
};
- irq {
+ irq: irq {
compatible = "sandbox,irq";
+ interrupt-controller;
+ #interrupt-cells = <2>;
};
lcd {