From eee74b874319b982cbae30a4a335f5dceda74c32 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Fri, 7 Feb 2025 07:37:28 +0100 Subject: [PATCH] core: interrupt: clarify when dt_get_irq handler is needed Add an inline comment telling struct itr_chip:dt_get_irq handler is needed only when interrupt consumer manually get configuration information from the DT to later configure the interrupt. The aim of this change is to clarify this handler is not needed for interrupt provider registered with interrupt_register_provider() and which consumer rely on interrupt_dt_get_by_*() to configure their interrupts. Signed-off-by: Etienne Carriere Reviewed-by: Jens Wiklander --- core/include/kernel/interrupt.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/include/kernel/interrupt.h b/core/include/kernel/interrupt.h index e49c96e6f38..0cab0c84f61 100644 --- a/core/include/kernel/interrupt.h +++ b/core/include/kernel/interrupt.h @@ -43,6 +43,10 @@ struct itr_chip { * @type If not NULL, output interrupt type (IRQ_TYPE_* defines) * or IRQ_TYPE_NONE if unknown * @prio If not NULL, output interrupt priority value or 0 if unknown + * + * This handler is required to support dt_get_irq_type_prio() and + * dt_get_irq() API function for interrupt consumers manually + * retrieving trigger type and/or priority from the device tree. */ int (*dt_get_irq)(const uint32_t *properties, int count, uint32_t *type, uint32_t *prio);