linux - How to determine the IRQ number for a USB device? -


i new driver development. however, purchased osr usb fx2 learning kit, comes sample codes windows kernel/user mode driver. however, writing driver in linux (ubuntu 12). have been able send control commands , receive return of control commands device. have been able send , read data on bulk out/in endpoints device supports.

there 1 more experiment have yet complete. device has following endpoints:

1. bulk (out) --> address 0x06 2. bulk (in)  --> address 0x88 3. interrupt (in) --> address 0x81 

i unable figure out how find irq number interrupt (in) endpoint. understand how install irq handler using:

int request_irq (unsigned int irq,                  irq_handler_t handler,                  unsigned long irqflags,                  const char * devname,                  void * dev_id); 

and write handler correct function prototype. however, wondering how find irq line (irq number) device interrupting on? is, how determine value of argument unsigned int irq in request_irq function above should be? read through book "linux device drivers, third edition" how irq number determined parallel ports. however, how work usb , how go probing or finding out number should usb device?

you don't need deal interrupts writing usb device driver, if tutorial on have at

http://www.linuxforu.com/2011/10/usb-drivers-in-linux-1/

which excellent starting point learn how write usb drivers;

if have specific issues go along; post them we'll see how goes :)

edit

you can use platform_get_irq or platform_get_irq_byname irq device.

edit 2:

i point http://lwn.net/images/pdf/ldd3/ch10.pdf viewing pleasure :-) shows how retrieve irqs assigned devices.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -