MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dtb_node_irq_get_byname

Function dtb_node_irq_get_byname

components/legacy/fdt/src/dtb_base.c:527–539  ·  view source on GitHub ↗

* dtb_node_irq_get_byname - Decode a node's IRQ and return it as a Linux IRQ number * @dev: pointer to device tree node * @name: IRQ name * * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case * of any other failure. */

Source from the content-addressed store, hash-verified

525 * of any other failure.
526 */
527int dtb_node_irq_get_byname(struct dtb_node *dev, const char *name)
528{
529 int index;
530
531 if (!name)
532 return -EINVAL;
533
534 index = dtb_node_stringlist_search(dev, "interrupt-names", name);
535 if (index < 0)
536 return index;
537
538 return dtb_node_irq_get(dev, index);
539}
540
541/**
542 * dtb_node_irq_count - Count the number of IRQs a node uses

Callers

nothing calls this directly

Calls 2

dtb_node_irq_getFunction · 0.85

Tested by

no test coverage detected