Hi Anish,<br><br><div class="gmail_quote">On Mon, May 28, 2012 at 9:16 AM, anish singh <span dir="ltr"><<a href="mailto:anish198519851985@gmail.com" target="_blank">anish198519851985@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, May 28, 2012 at 2:57 AM, richard -rw- weinberger<br>
<<a href="mailto:richard.weinberger@gmail.com">richard.weinberger@gmail.com</a>> wrote:<br>
> On Sun, May 27, 2012 at 2:02 AM, Mark Farnell <<a href="mailto:mark.farnell@gmail.com">mark.farnell@gmail.com</a>> wrote:<br>
>> In the kernel, how can I find out the interrupt vector number of a<br>
>> given IRQ (for example, IRQ7)?<br>
>><br>
>> Within the kernel module, I would like to manually set the IRQ using<br>
>> the assembly code:<br>
>><br>
>> asm("int $<irq vector>");<br>
>><br>
>> and let the IRQ handler installed by a different module catch that interrupt.<br>
>><br>
>> Is this possible?<br>
><br>
> No really because not all IRQ have an interrupt line to the CPU.<br>
> Linux can multiplex and emulate them. Think of GPIO drivers with<br>
> interrupt support.<br>
</div>Can you please describe this in detail?It would really help a lot of<br>
people like me.Does multiplex mean that all numbers starting from<br>
0,1,2,3,...... TOTAL-interrupt will have interrupt lines associated with it<br>
eventhough all interrupt numbers are not linear?<br></blockquote><div><br>
<p class="MsoNormal">GPIOs are grouped as banks. Let’s say 32 gpios are in a
bank.<br>
There will be only single interrupt line to interrupt controller for a bank.</p><p class="MsoNormal"><br>
Consider that you have configured gpio1 and gpio16 as interrupts.<br>
Even if interrupt happens on gpio 1 or gpio 16, the same interrupt line will be
triggered to </p>
<p class="MsoNormal">Interrupt controller.</p><p class="MsoNormal"><br></p><p class="MsoNormal"> Now the gpio driver has to figure out
reading the Interrupt status </p>
<p class="MsoNormal">Register of GPIO to find which interrupt (gpio1 or gpio16)
has really fired.</p>
<p class="MsoNormal">So in this case a single interrupt line is multiplex for 32 gpio
interrupts.<span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:#17365d"></span></p>
<br>HTH.<br><br>Thanks,<br>Arun<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">> Anyway, why to you think you need to trigger the raw IRQ manually?<br>
> This sounds really odd...<br>
><br>
><br>
> --<br>
> Thanks,<br>
> //richard<br>
><br>
> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br>