In the device tree I am using, in one of its node, the filed interrupts
is:
interrupts = <0x0 0x1d 0x4>;
(from a device tree of a Pynq board, equipaged with a ZYnq device with a dual-core ARM A9 )
Now, in the device tree .probe
function, I use the Linux kernel API:
irq_line = platform_get_irq(pdev, 0);
in order to get the irq to use for the function request_irq
(described in ldd3 chapter 10).
Ones the irq_line = platform_get_irq(pdev, 0);
is executed, I get the value 0x2e
that DOESN'T match with the fields of the interrupts
of the device tree.
<0x0 0x1d 0x4>
numbers? I know that, in according to elinux.org,:interrupts - A property of a device node containing a list of interrupt specifiers, one for each interrupt output signal on the device.
How can I get the irq line to use (maybe starting from these numbers)? Is the irq line related to the device tree?
Why am I getting a value that doesn't match with no one of the fields of interrupts
?
I am sure I am misunderstanding some important topics, I am sorry. And thank you for reading the question and sharing your knowledge.
What are exactly the <0x0 0x1d 0x4> numbers? I know that, in according to elinux.org, (interrupts = <0x0 0x1d 0x4>;)
Firstly you need to look at the interrupt-parent of the device node, this parent will #interrupt-cells property which specifies number of bits needed to encode a interrupt source, so from your entry interrupts = <0x0 0x1d 0x4>; means the following:
0x0 = shared processor interrupts
0x1d = interrupt number
0x4 = active high level-sensitive/[IRQ_TYPE_LEVEL_HIGH][2]
How can I get the irq line to use (maybe starting from these numbers)? Is the irq line related to the device tree?
Why am I getting a value that doesn't match with no one of the fields of interrupts?