of_irq_parse_raw — Low level interrupt tree parsing
int of_irq_parse_raw ( | const __be32 * addr, |
struct of_phandle_args * out_irq) ; |
addr
If not NULL, an array of address values to be matched
out_irq
Pointer to an input/output structuren
This function is a low-level interrupt tree walking function. It can be used to do a partial walk with synthetized reg and interrupts properties, for example when resolving PCI interrupts when no device node exist for the parent. It takes an interrupt specifier structure as input, walks the tree looking for any interrupt-map properties, translates the specifier for each map, and then returns the translated map.
Walk up the interrupt parent path (see of_irq_find_parent
) to find an
interrupt parent containing property “interrupt-map”. Match an
“interrupt-map” entry (masked by the “interrupt-map-mask” from the same
node). On match, the new parent in the walk is the node referenced by the
phandle in the matched “interrupt-map” entry and the values to match are
updated with the values matched entry.
The walk continues until a node containing property “interrupt-controller” is reached.
The number of elements of addr
is determined by property “#address-cells”.
“#address-cells” is often zero.
== out_irq
input fields
out_irq
->np - Pointer to devicetree node to start the walk.
out_irq
->args[] - “#interrupt-cells” values to be matched in the
interrupt-map.
out_irq
->args_count - The number of input values in out_irq
->args[]. Must
be same as the value of property “#interrupt-cells” in node out_irq
->np,
or found in a node walking up the tree.
The values to match are constructed from the values of addr
, followed by
the values from out_irq
->args[]. If addr
is NULL, and “#address-cells” is
greater than 0 the values of addr
to match are 0.
== out_irq
output fields
out_irq
->np - pointer to final node found to contain property “interrupt-map”
out_irq
->args[] - The interrupt values to be found in an “interrupt-map”
property.
out_irq
->args_count - Number of elements of out_irq
->args[].
out_irq
can be used to call irq_create_of_mapping
.
On success the final translated interrupt specifier is returned in out_irq
.