Skip to content

Commit

Permalink
core: interrupt: clarify when dt_get_irq handler is needed
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
  • Loading branch information
etienne-lms committed Feb 14, 2025
1 parent fb02196 commit eee74b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/include/kernel/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eee74b8

Please sign in to comment.