irq_of_parse_and_map usage - on mpc5121
Hello, I have an application where I receive a pulse routed by the CPLD to IRQ1 and I need to assign a virtual interrupt for the driver that needs it (the driver part's OK, I see the instance in /proc/interrupts).
The new interrupt entry has been created in the dts file as well but I still need to relate the actual interrupt to the virtual interrupt I call in the driver...
I see the topic has already been covered - for example:
"..........Laxmikant Rashinkar wrote:
> But with the newer linux, request_irq() works only for 17, 18 & 19. cat /proc/interrupts shows that none of the interrupts above are in use.
> Any pointers on why request_irq() is behaving thus?
Note that you need to get the raw IRQ number from the device tree now,
and map it to a virtual IRQ number using irq_of_parse_and_map.
That is the number you pass to request_irq()..............."
That's exactly my need - but I don't know how to do it. Is there sample/ tutorial code - and where to put it in the file system - be available?
Thanks in advance