tags:

views:

22

answers:

1

Hi,

I'm using Linux platform to program in embedded device.

Is there any way that a kernel module can detect the interrupt handler routine of an another device driver module?

Like for example, I have a kernel module(.ko), then I want this kernel module detect if a particular device driver execute its interrupt handle routine?

Is this possible?

Many thanks.

+1  A: 

The simplest way to do this would be to modify the device driver to allow your module to register a callback, which the device driver calls during its interrupt routine or similar.

caf
You mean the interrupt routine of the device driver will call the callback function?
sasayins
That's one possibility, but it depends on what you need to do. A better design might be to have the interrupt routine schedule your callback through a work queue, athough there will be higher latency in this case.
caf