Results 1 to 3 of 3
Hi,
I am kind of stuck at this point.
The situation is thus :
I have two devices A and B. The moment a certain interrupt X happens on device ...
- 08-28-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 2
Disabling interrupts on one device from the driver of another
Hi,
I am kind of stuck at this point.
The situation is thus :
I have two devices A and B. The moment a certain interrupt X happens on device A i need to disable device B from doing any further interrupts. And then once the interrupt X on A is cleared i need to enable interrupts on B. This has to be done using a bunch of ioctl() calls. I know the parameters to pass (ie, the file descriptor and so on). I also have functions that will give me the major and the minor number of the associated device (ie. the particular instance of B).
My problem is how do i call those functions on the instance of B from the driver(code) of A. Apparently, EXPORT_SYMBOL_NOVERS or a variant of that is supposed to export the specified symbol to the kernel.
a) where do i put this EXPORT_SYMBOL_NOVERS statement (in the driver code of A or driver code of B) and what are the necessary generic conditions and implications of this statement?
I am fairly a newbie to the world of device drivers in linux and i would be grateful for any help on this.
Regards,
Vivek
- 08-31-2007 #2Just Joined!
- Join Date
- Apr 2007
- Posts
- 32
re
After inserting the your driver module A into kernel, all exported symblos are listed in the kernel symbol table (kallsyms file). So driver B can get the mentioned symbol directly. you need not put any effort.
Alternatively
Your common function shuld be implemented like as seperate module ( ex like video-buf/v4l2-compat) then modprobe common_module_name, As next insmod driver a & b.
I hope it helps you
Regards
Ravime
- 09-01-2007 #3Just Joined!
- Join Date
- Aug 2007
- Posts
- 2
Thanks. I did just the same. The only problem was that the script that was doing the insmod was loading A's driver before B.
It took me a day to figure out where this script was hiding, but now it works.
Thanks.
P.S: For anyone else who may be having a problem with EXPORT_SYMBOL_NOVERS, you have to put a #define EXPORT_SYMTAB at the very beging of your source from where you are EXPORT_SYMBOL_NOVERS exports the symbol. Without this symtab thing it doesnt seem to work.


Reply With Quote

