tags:

views:

27

answers:

1

Hi,

Im learning device driver programming in Linux. And I'm wondering where I could the IRQ number in the request_irq function.

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

In the irq parameter, what value or where could I find that value to put in the request_irq function?

Thanks

A: 

You seem learning the device programming from the wrong side - without a device.

If you have e.g. device on PCI but, then its IRQ is negotiated by the PCI and is available via Linux PCI subsystem.

If you have some custom wired device, quite often its IRQ line is hardwired and you should ask the people who made the custom device where it was wired to and what IRQ it is.

Otherwise buy yourself a copy of LDD3 - it's worth it and describes all that in details.

Dummy00001