[PATCH v2 12/17] dm: irq: Add support for requesting interrupts
Bin Meng
bmeng.cn at gmail.com
Tue Feb 4 10:08:03 CET 2020
On Tue, Feb 4, 2020 at 8:20 AM Simon Glass <sjg at chromium.org> wrote:
>
> 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 at chromium.org>
> ---
>
> Changes in v2: None
>
> arch/sandbox/dts/test.dts | 5 +-
> .../interrupt-controller/interrupts.txt | 131 ++++++++++++++++++
> drivers/misc/irq-uclass.c | 116 ++++++++++++++++
> drivers/misc/irq_sandbox.c | 41 ++++++
> include/irq.h | 115 +++++++++++++++
> test/dm/irq.c | 31 +++++
> 6 files changed, 438 insertions(+), 1 deletion(-)
> create mode 100644 doc/device-tree-bindings/interrupt-controller/interrupts.txt
>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
More information about the U-Boot
mailing list