2
votes

I am looking into the fpga driver code which will write some value to FPGA device at low level. At top level in user space value is being written to /dev/fpga, now I guess this is the logic how driver gets its value from user-space and exposed file in user space is "/dev/fpga". But now how actually this value from fpga is reached to device , there must some callback maintained.

But I really could not figure out how it actually happens,Is there any standard way?

Anybody can help me find out this userspace to kernel space link.

1
I don't understand your question. Perhaps some diagrams or source-code might help? - marko
Few days back I asked same kind of question where how callbacks for sysfs is mainted,stackoverflow.com/questions/18405700/… - Amit Singh Tomar

1 Answers

2
votes

It's probably a character device. You can create one in your kernel module, and your callback functions will be called in the kernel when it is opened, something is written to it etc. See:

http://linux.die.net/lkmpg/x569.html

for an explanation how it works and sample code.